Description
Environment data
- VS Code version: 1.28.2
- Extension version (available under the Extensions sidebar): 2018.10.0
- OS and version: Windows 7
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.0 (base)
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Actual behavior
While typing a name, the Problems window raises "used before definition" warnings that do not go away when the name is completed.
The following actions do NOT fix this:
- Closing and reopening the file
- Modifying the name to something else and back again
- Deleting the name or entire line
- Deleting all content in the file and re-pasting
The only reliable way I have found so far to fix this is to restart VSCode.
Unlike #2290, this does NOT happen when jedi is enabled. This also does not appear to be a linter issue, as the (pylint) output does not show any of these warnings:
Can't seem to reproduce this with a toy example, but it is happening often enough in real projects that it is becoming a major usability issue. The number of "problems" explodes with phantom entries and makes the tool useless.
Expected behavior
Don't show problems in Problems window if they don't exist.
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Starting Microsoft Python language server.
Microsoft Python Language Server version 0.1.60.0
Initializing for C:\Python37\python.exe
##########Linting Output - pylint##########
************* Module xml2data.elem.generic
40,4,convention,C0103:Attribute name "c" doesn't conform to snake_case naming style
------------------------------------------------------------------
Your code has been rated at 9.76/10 (previous run: 9.76/10, +0.00)
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)