typing.SupportsRound

class typing.SupportsRound An ABC with one abstract method __round__ that is covariant in its return type.

typing.SupportsInt

class typing.SupportsInt An ABC with one abstract method __int__.

typing.SupportsFloat

class typing.SupportsFloat An ABC with one abstract method __float__.

typing.SupportsAbs

class typing.SupportsAbs An ABC with one abstract method __abs__ that is covariant in its return type.

typing.Set

class typing.Set(set, MutableSet[T]) A generic version of builtins.set.

typing.Sequence

class typing.Sequence(Sized, Iterable[T_co], Container[T_co]) A generic version of collections.abc.Sequence.

typing.Reversible

class typing.Reversible An ABC with one abstract method __reversed__ returning an Iterator[T_co].

typing.re

class typing.re Wrapper namespace for regular expression matching types. This defines the type aliases Pattern and Match which correspond to the return types from re.compile() and re.match(). These types (and the corresponding functions) are generic in AnyStr and can be made specific by writing Pattern[str], Pattern[bytes], Match[str], or Match[bytes].

typing.Optional

class typing.Optional Optional type. Optional[X] is equivalent to Union[X, type(None)]. Note that this is not the same concept as an optional argument, which is one that has a default. An optional argument with a default needn’t use the Optional qualifier on its type annotation (although it is inferred if the default is None). A mandatory argument may still have an Optional type if an explicit value of None is allowed.

typing.no_type_check_decorator()

@typing.no_type_check_decorator(decorator) Decorator to give another decorator the no_type_check() effect. This wraps the decorator with something that wraps the decorated function in no_type_check().