Skip to content

Commit e250b27

Browse files
committed
skip dunder methods
1 parent 8cdac52 commit e250b27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/checkmember.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ def analyze_class_attribute_access(
11601160
if info.fallback_to_any or info.meta_fallback_to_any:
11611161
return apply_class_attr_hook(mx, hook, AnyType(TypeOfAny.special_form))
11621162
# For enum types, report missing member with fuzzy matching suggestions
1163-
if info.is_enum and info.enum_members:
1163+
if info.is_enum and info.enum_members and not (name.startswith("__") and name.endswith("__"):
11641164
return report_missing_attribute(mx.original_type, itype, name, mx)
11651165
return None
11661166

0 commit comments

Comments
 (0)