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 384b0ee commit 44a9e32Copy full SHA for 44a9e32
mypy/util.py
@@ -62,7 +62,7 @@ def is_dunder(name: str, exclude_special: bool = False) -> bool:
62
"""
63
if exclude_special and name in SPECIAL_DUNDERS:
64
return False
65
- return name.startswith("__") and name.endswith("__") and name.replace("_", "")
+ return name.startswith("__") and name.endswith("__") and bool(name.replace("_", ""))
66
67
68
def is_sunder(name: str) -> bool:
0 commit comments