-
Notifications
You must be signed in to change notification settings - Fork 765
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
Relative imports broken with "python.analysis.extraPaths" #3194
Comments
This issue has been fixed in prerelease version 2022.9.11, which we've just released. You can find the changelog here: CHANGELOG.md |
after updating to 1.71.2 still I have the same issue |
it seems by setting as following(either for python language or the global vscode behavior), vscode will stop changing the relative imports to full path imports. "editor.codeActionsOnSave": {
"source.fixAll": false,
}, |
"source.fixAll": true basically run every source.fixAll code action registered by extension. and that is probably why our new fix all got called. if you put "false" for all our fix all code actions, it shouldn't try to fix see this for all our fix all code actions. https://github.com/microsoft/pylance-release#source-code-actions |
see this comment for more detail - #3181 (comment) vscode team has a tracking issue for better "editor.codeActiosOnSave": microsoft/vscode#82718 |
@heejaechang thank you for your reply that was very helpful to know that |
Environment data
Repro Steps
Expected behavior
When saving a python file, keep relative imports that are related to the package, and keep the imports from packages that are installed inside the "pypackages/3.10/lib" as normal inputs; not adding a relative path.
Example:
Actual behavior
The imports that are related to packages installed inside "pypackages/3.10/lib" are reformated to be a relative import.
Example:
Logs
The text was updated successfully, but these errors were encountered: