We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 412c03a commit c381ea3Copy full SHA for c381ea3
mypy/checkmember.py
@@ -1351,10 +1351,10 @@ def analyze_enum_class_attribute_access(
1351
return None
1352
1353
node = itype.type.get(name)
1354
- if not isinstance(node.node, Var) or not node.node.has_explicit_value:
+ if not node or not isinstance(node.node, Var) or not node.node.has_explicit_value:
1355
# Annotated but not assigned attributes are not enum members
1356
1357
- if node and node.type:
+ if node.type:
1358
proper = get_proper_type(node.type)
1359
# Support `A = nonmember(1)` function call and decorator.
1360
if (
0 commit comments