Skip to content

Annotated class variables raising unknown variable error #3116

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

Closed
malmaud opened this issue Nov 1, 2018 · 3 comments
Closed

Annotated class variables raising unknown variable error #3116

malmaud opened this issue Nov 1, 2018 · 3 comments
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@malmaud
Copy link

malmaud commented Nov 1, 2018

With Python extension 2018.9.2 on VSCode 1.28.2 on OS X 10.14:

import typing

class A:
    b: typing.Any

"Problems" panel displays:

{
	"owner": "_generated_diagnostic_collection_name_#1",
	"code": "used-before-assignment",
	"severity": 4,
	"message": "unknown variable 'b'",
	"source": "Python (analysis)",
	"startLineNumber": 4,
	"startColumn": 5,
	"endLineNumber": 4,
	"endColumn": 6
}
@DonJayamanne
Copy link

New message with the latest version 0.1.63 is 'b' used before definition

@DonJayamanne DonJayamanne added needs upstream fix bug Issue identified by VS Code Team member as probable bug area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. and removed triage labels Nov 19, 2018
@DonJayamanne DonJayamanne removed their assignment Dec 6, 2018
@DonJayamanne
Copy link

Fixed in PTVSD

@malmaud
Copy link
Author

malmaud commented Dec 14, 2018

Isn't the corresponding language server issue still open? microsoft/python-language-server#395

@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants