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 6c1eb5b commit 99a0b36Copy full SHA for 99a0b36
mypy/semanal.py
@@ -2871,7 +2871,7 @@ def analyze_name_lvalue(self,
2871
outer = self.is_global_or_nonlocal(name)
2872
if kind == MDEF and isinstance(self.type, TypeInfo) and self.type.is_enum:
2873
# Special case: we need to be sure that `Enum` keys are unique.
2874
- if existing:
+ if existing is not None and not isinstance(existing.node, PlaceholderNode):
2875
self.fail('Attempted to reuse member name "{}" in Enum definition "{}"'.format(
2876
name, self.type.name,
2877
), lvalue)
0 commit comments