Skip to content

Commit c381ea3

Browse files
committed
selfcheck fix
1 parent 412c03a commit c381ea3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/checkmember.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,10 +1351,10 @@ def analyze_enum_class_attribute_access(
13511351
return None
13521352

13531353
node = itype.type.get(name)
1354-
if not isinstance(node.node, Var) or not node.node.has_explicit_value:
1354+
if not node or not isinstance(node.node, Var) or not node.node.has_explicit_value:
13551355
# Annotated but not assigned attributes are not enum members
13561356
return None
1357-
if node and node.type:
1357+
if node.type:
13581358
proper = get_proper_type(node.type)
13591359
# Support `A = nonmember(1)` function call and decorator.
13601360
if (

0 commit comments

Comments
 (0)