Skip to content

Commit

Permalink
Fix type narrowing for types.EllipsisType (#17003)
Browse files Browse the repository at this point in the history
Fixes #17002
  • Loading branch information
hauntsaninja authored Mar 10, 2024
1 parent 4259e37 commit 16abf5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ def is_singleton_type(self) -> bool:
return (
self.type.is_enum
and len(self.get_enum_values()) == 1
or self.type.fullname == "builtins.ellipsis"
or self.type.fullname in {"builtins.ellipsis", "types.EllipsisType"}
)

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

0 comments on commit 16abf5c

Please sign in to comment.