module documentation

A shared state for all TypeInfos that holds global cache and dependency information, and potentially other mutable TypeInfo state. This module contains mutable global state.

Class TypeState This class provides subtype caching to improve performance of subtype checks. It also holds protocol fine grained dependencies.
Function reset_global_state Reset most existing global state.
Constant type_state Undocumented
Type Alias SubtypeCache Undocumented
Type Alias SubtypeKind Undocumented
Type Alias SubtypeRelationship Undocumented
def reset_global_state(): (source)

Reset most existing global state. Currently most of it is in this module. Few exceptions are strict optional status and and functools.lru_cache.

type_state = (source)

Undocumented

Value
TypeState()
SubtypeCache: _TypeAlias = (source)
SubtypeKind: _TypeAlias = (source)

Undocumented

Value
Tuple[bool, ...]
SubtypeRelationship: _TypeAlias = (source)

Undocumented

Value
Tuple[Instance, Instance]