We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Note: this content is roughly equivalent to that of an still unanswered question I posted at SO.
from enum import Enum class Whatever(Enum): Foo = 1 Bar = 2 def f(): x = Whatever.Foo
Consider the program above an a call to infer() on expression Whatever.Foo.
infer()
Whatever.Foo
I get a (proxied) ClassDef for a Foo "type".
ClassDef
Foo
I'd expect a (proxied) ClassDef for Whatever.
Whatever
This would be according to the language specification, that says that the type of an enumeration member is the enumeration it belongs to.
astroid version: 2.3.3
The text was updated successfully, but these errors were encountered:
Enums
Enum
Successfully merging a pull request may close this issue.
Note: this content is roughly equivalent to that of an still unanswered question I posted at SO.
Consider the program above an a call to
infer()
on expressionWhatever.Foo
.Current behavior
I get a (proxied)
ClassDef
for aFoo
"type".Expected behavior
I'd expect a (proxied)
ClassDef
forWhatever
.This would be according to the language specification, that says that the type of an enumeration member is the enumeration it belongs to.
astroid version: 2.3.3
The text was updated successfully, but these errors were encountered: