VS Code adds the names of unsaved files to sys.path in the completions process #677
Labels
area-intellisense
LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.
bug
Issue identified by VS Code Team member as probable bug
Milestone
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:
completions.py
process 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 globalsys.path
of the completions process.The text was updated successfully, but these errors were encountered: