@@ -80,23 +80,23 @@ async function findAllFastAPIFiles(
8080async function parsePyprojectForEntryPoint (
8181 folderUri : vscode . Uri ,
8282) : Promise < EntryPoint | null > {
83- const pyprojecttomlFiles = await vscode . workspace . findFiles (
83+ const pyprojectTomlFiles = await vscode . workspace . findFiles (
8484 new vscode . RelativePattern ( folderUri , "**/pyproject.toml" ) ,
8585 new vscode . RelativePattern (
8686 folderUri ,
8787 "**/{.venv,venv,__pycache__,node_modules,.git,tests,test}/**" ,
8888 ) ,
8989 )
9090
91- if ( pyprojecttomlFiles . length === 0 ) {
91+ if ( pyprojectTomlFiles . length === 0 ) {
9292 return null
9393 }
9494
95- pyprojecttomlFiles . sort (
95+ pyprojectTomlFiles . sort (
9696 ( a , b ) => a . path . split ( "/" ) . length - b . path . split ( "/" ) . length ,
9797 )
9898
99- for ( const fileUri of pyprojecttomlFiles ) {
99+ for ( const fileUri of pyprojectTomlFiles ) {
100100 try {
101101 const document = await vscode . workspace . openTextDocument ( fileUri )
102102 const contents = toml . parse ( document . getText ( ) ) as Record < string , unknown >
@@ -111,7 +111,8 @@ async function parsePyprojectForEntryPoint(
111111
112112 const { relativePath, variableName } =
113113 parseEntrypointString ( entrypointValue )
114- const fullUri = vscode . Uri . joinPath ( fileUri , ".." , relativePath )
114+ const dirUri = vscode . Uri . joinPath ( fileUri , ".." )
115+ const fullUri = vscode . Uri . joinPath ( dirUri , relativePath )
115116
116117 return ( await vscodeFileSystem . exists ( fullUri . toString ( ) ) )
117118 ? { filePath : fullUri . toString ( ) , variableName }
0 commit comments