forked from DonJayamanne/pythonVSCode
- Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Milestone
Description
Environment data
VS Code version: 1.19.3
Python Extension version: 0.9.1
Python Version: 2.7.12
OS and version: Ubuntu 16.04.3 x64
Actual behavior
The names of unsaved files are added to the sys.path for completion. The code that does this is:
https://github.com/Microsoft/vscode-python/blob/b09a4218f5fd2817c0f5544dce5b1e9bba72fc9d/pythonFiles/completion.py#L593-L596
Expected behavior
They should not be added.
Steps to reproduce:
- Edit an unsaved Python file (You will have to set language mode to Python).
- Debug the
completions.pyprocess and see that it added the "Untitled-1" name to thesys.path
Screenshot
P.S. Jedi takes a sys_path argument that can be used instead of munging the global sys.path of the completions process.
Metadata
Metadata
Assignees
Labels
area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
