-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Language Server incorrectly marks variables as undefined in nested list comprehensions #3297
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
Comments
I think this is a language server issue, not a linting issue. The message is not prefixed with [pylint] and still appears when pylint is disabled. |
This issue was moved to microsoft/python-language-server#387 |
I have a probably related problem, not exactly an issue of nesting. It is occurring only on a return though. x = {}
def fn(a,b):
return (a,b)
def foo():
y = [ fn(a,b) for a,b in x.items() ] # no issue
return [ fn(a,b) for a,b in x.items() ] # Shows a,b as undefined variables This is ms-python.python 2019.3.6215 The reported issue is (for a and b) |
@marvingreenberg please report upstream at https://github.com/microsoft/python-language-server. |
Original issue was fixed upstream (microsoft/python-language-server#387) |
Environment data
Actual behavior
Expected behavior
Linter does not incorrectly mark variable as undeclared
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)The text was updated successfully, but these errors were encountered: