class documentation

Visitor for performing recursive queries of types with a bool result. Use TypeQuery if you need non-bool results. 'strategy' is used to combine results for a series of types. It must be ANY_STRATEGY or ALL_STRATEGY. Note: This visitor keeps an internal state (tracks type aliases to avoid recursion), so it should *never* be re-used for querying different types unless you call reset() first.

Method __init__ Undocumented
Method query_types Perform a query for a sequence of types using the strategy to combine the results.
Method reset Clear mutable state (but preserve strategy).
Method visit_any Undocumented
Method visit_callable_argument Undocumented
Method visit_callable_type Undocumented
Method visit_deleted_type Undocumented
Method visit_ellipsis_type Undocumented
Method visit_erased_type Undocumented
Method visit_instance Undocumented
Method visit_literal_type Undocumented
Method visit_none_type Undocumented
Method visit_overloaded Undocumented
Method visit_param_spec Undocumented
Method visit_parameters Undocumented
Method visit_partial_type Undocumented
Method visit_placeholder_type Undocumented
Method visit_raw_expression_type Undocumented
Method visit_tuple_type Undocumented
Method visit_type_alias_type Undocumented
Method visit_type_list Undocumented
Method visit_type_type Undocumented
Method visit_type_var Undocumented
Method visit_type_var_tuple Undocumented
Method visit_typeddict_type Undocumented
Method visit_unbound_type Undocumented
Method visit_uninhabited_type Undocumented
Method visit_union_type Undocumented
Method visit_unpack_type Undocumented
Instance Variable default Undocumented
Instance Variable seen_aliases Undocumented
Instance Variable skip_alias_target Undocumented
Instance Variable strategy Undocumented
def query_types(self, types: list[Type]|tuple[Type, ...]) -> bool: (source)

Perform a query for a sequence of types using the strategy to combine the results.

def reset(self): (source)

Clear mutable state (but preserve strategy). This *must* be called if you want to reuse the visitor.

def visit_any(self, t: AnyType) -> bool: (source)
def visit_deleted_type(self, t: DeletedType) -> bool: (source)
def visit_ellipsis_type(self, t: EllipsisType) -> bool: (source)
def visit_instance(self, t: Instance) -> bool: (source)
def visit_literal_type(self, t: LiteralType) -> bool: (source)
def visit_none_type(self, t: NoneType) -> bool: (source)
def visit_overloaded(self, t: Overloaded) -> bool: (source)
def visit_param_spec(self, t: ParamSpecType) -> bool: (source)
def visit_parameters(self, t: Parameters) -> bool: (source)
def visit_partial_type(self, t: PartialType) -> bool: (source)
def visit_tuple_type(self, t: TupleType) -> bool: (source)
def visit_type_alias_type(self, t: TypeAliasType) -> bool: (source)
def visit_type_list(self, t: TypeList) -> bool: (source)
def visit_type_type(self, t: TypeType) -> bool: (source)
def visit_type_var_tuple(self, t: TypeVarTupleType) -> bool: (source)
def visit_typeddict_type(self, t: TypedDictType) -> bool: (source)
def visit_unbound_type(self, t: UnboundType) -> bool: (source)
def visit_union_type(self, t: UnionType) -> bool: (source)
def visit_unpack_type(self, t: UnpackType) -> bool: (source)

Undocumented

seen_aliases = (source)

Undocumented

skip_alias_target: bool = (source)

Undocumented

strategy = (source)

Undocumented