Skip to content

Commit

Permalink
Fix type narrowing for types.EllipsisType
Browse files Browse the repository at this point in the history
Fixes #17002
  • Loading branch information
hauntsaninja committed Mar 9, 2024
1 parent 790e8a7 commit 63d491a
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 63d491a

Please sign in to comment.