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 f0c5e37 commit 5955210Copy full SHA for 5955210
mypy/nodes.py
@@ -3240,8 +3240,14 @@ def enum_members(self) -> list[str]:
3240
and name not in EXCLUDED_ENUM_ATTRIBUTES
3241
and not name.startswith("__")
3242
and sym.node.has_explicit_value
3243
- and not (isinstance(typ := mypy.types.get_proper_type(sym.node.type), mypy.types.Instance) and typ.type.fullname == "enum.nonmember")
3244
- ) or (
+ and not (
+ isinstance(
3245
+ typ := mypy.types.get_proper_type(sym.node.type), mypy.types.Instance
3246
+ )
3247
+ and typ.type.fullname == "enum.nonmember"
3248
3249
3250
+ or (
3251
isinstance(sym.node, Decorator)
3252
and any(
3253
dec.fullname == "enum.member"
0 commit comments