From 63d491a8f7d476381d2826f46a638d536e54521e Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sat, 9 Mar 2024 00:08:47 -0800 Subject: [PATCH] Fix type narrowing for types.EllipsisType Fixes #17002 --- mypy/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/types.py b/mypy/types.py index f76e35784d8f..14a3e1a47956 100644 --- a/mypy/types.py +++ b/mypy/types.py @@ -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]: