Skip to content

Commit 16abf5c

Browse files
authored
Fix type narrowing for types.EllipsisType (#17003)
Fixes #17002
1 parent 4259e37 commit 16abf5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ def is_singleton_type(self) -> bool:
15241524
return (
15251525
self.type.is_enum
15261526
and len(self.get_enum_values()) == 1
1527-
or self.type.fullname == "builtins.ellipsis"
1527+
or self.type.fullname in {"builtins.ellipsis", "types.EllipsisType"}
15281528
)
15291529

15301530
def get_enum_values(self) -> list[str]:

0 commit comments

Comments
 (0)