-
-
Couldn't load subscription status.
- Fork 307
Open
Description
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.FooConsider the program above an a call to infer() on expression Whatever.Foo.
Current behavior
I get a (proxied) ClassDef for a Foo "type".
Expected behavior
I'd expect a (proxied) ClassDef for 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
Metadata
Metadata
Assignees
Labels
No labels