-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python.analysis.extraPaths not work in workspace settings.json but it's alright in user settings.json #588
Comments
Can you please provide trace logs from the "Python Language Server" output window for both cases? It should print the paths it's using at startup. https://github.com/microsoft/pylance-release/blob/master/TROUBLESHOOTING.md#filing-an-issue |
Are these messages enough? Whether I use workspace settings or user settings, they both return these messages(my paths not included). The difference when I use workspace settings is that it return the messages below when I move mouse uppon those unresolved modules.
Normally it returns |
BTW, when I set |
I solved it.It's because I edited the folder settings which path is |
Thanks for letting us know. VS Code does take things first from the folder, then workspace, then user settings, whichever is set first. Unfortunately the UI for this hierarchy isn't the best, and it can be annoying to notice misconfigurations. It'd be nice if the UI improved (say, showed that it overrode or something), but that'd have to be done in VS Code itself. |
I found out that when using workspace settings ( In my case, I have the following tree:
My
This allows me to auto-import I found a workaround to support customization per folder:
|
platform
: win10pylance version
: v2020.11.0I used absolute path. The path includes my own module. When I add it to workspace settings.json, it can't resolve nor use F12. But it works fine when I add the same setting in
Preferences: Open Settings (Json)
.The text was updated successfully, but these errors were encountered: