MCPcopy Index your code
hub / github.com/python/mypy / EllipsisType

Class EllipsisType

mypy/types.py:3455–3471  ·  view source on GitHub ↗

The type ... (ellipsis). This is not a real type but a syntactic AST construct, used in Callable[..., T], for example. A semantically analyzed type will never have ellipsis types.

Source from the content-addressed store, hash-verified

3453
3454
3455class EllipsisType(ProperType):
3456 """The type ... (ellipsis).
3457
3458 This is not a real type but a syntactic AST construct, used in Callable[..., T], for example.
3459
3460 A semantically analyzed type will never have ellipsis types.
3461 """
3462
3463 __slots__ = ()
3464
3465 def accept(self, visitor: TypeVisitor[T]) -> T:
3466 assert isinstance(visitor, SyntheticTypeVisitor)
3467 ret: T = visitor.visit_ellipsis_type(self)
3468 return ret
3469
3470 def serialize(self) -> JsonDict:
3471 assert False, "Synthetic types don't serialize"
3472
3473
3474class TypeType(ProperType):

Callers 3

visit_ConstantMethod · 0.90
read_typeFunction · 0.90
expr_to_unanalyzed_typeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…