You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple python projects under my workspace.
They are in different subfolders.
I want to call files from the same directory in a subfolder.
But Pylance will only be defined to the workspace directory.
I can use "python.analysis.extraPaths" to add absolute paths, but it's a pain in the ass.
I would like to be able to customize the location of the directory.
For example, use "${fileDirname}" or "${workspaceFolder}", etc.
The text was updated successfully, but these errors were encountered:
extraPaths supports relative paths to the workspace. You can put in a path ./some/path, and the path will be rooted at the workspace. Does it not work for you?
extraPaths supports relative paths to the workspace. You can put in a path ./some/path, and the path will be rooted at the workspace. Does it not work for you?
I have multiple subfolders in my workspace folder, if I use this method I need to add many relative directories of folders.
The python compiler will automatically link to other files in the same directory as the compiled file, the project will compile normally, but using Pylance will prompt an error, and the auto-completion of other files will not work.
Are you saying that you're trying to do an absolute import of the compiled code, or a relative one? If you import relatively, then there isn't a need for the import root. If you're doing absolute imports, you may be hitting #253 which impacts imports that scripts may do due to scripts having their own special import path behavior.
This issue has been open with the "waiting for info" label for over a month, so I'm going to close it. If you can answer the questions above and it's not #253, I'm happy to reopen it.
I have multiple python projects under my workspace.
They are in different subfolders.
I want to call files from the same directory in a subfolder.
But Pylance will only be defined to the workspace directory.
I can use "python.analysis.extraPaths" to add absolute paths, but it's a pain in the ass.
I would like to be able to customize the location of the directory.
For example, use "${fileDirname}" or "${workspaceFolder}", etc.
The text was updated successfully, but these errors were encountered: