Skip to content

Commit 44a9e32

Browse files
committed
add the module path to the mangled name of an internal dataclass symbol
1 parent 384b0ee commit 44a9e32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def is_dunder(name: str, exclude_special: bool = False) -> bool:
6262
"""
6363
if exclude_special and name in SPECIAL_DUNDERS:
6464
return False
65-
return name.startswith("__") and name.endswith("__") and name.replace("_", "")
65+
return name.startswith("__") and name.endswith("__") and bool(name.replace("_", ""))
6666

6767

6868
def is_sunder(name: str) -> bool:

0 commit comments

Comments
 (0)