ft3.core.typ.utl.hint module

Type hinting utility functions.

collect_annotations(typed_obj: obj.SupportsAnnotations | type[obj.SupportsAnnotations]) typ.AnyDict

Get all type annotations for typed_obj.

Walks __bases__ to collect all annotations.

finalize_type(tp_or_ref_or_str: Any) Any

Recursively resolve any remaining ForwardRefs.

reference_and_expand_types(tp_or_ref: Any) list[Any]

Recursively expand all types (and type args) into flat list of types and / or ForwardRefs.

resolve_type(typ_ref_or_str: typ.AnyType | typ.StrOrForwardRef, globalns: typ.OptionalAnyDict = None, localns: typ.OptionalAnyDict = None, is_argument: bool = False) typ.AnyType | typ.AnyOrForwardRef

Attempt to resolve str or ForwardRef to type.

Recursively resolves parameterized generics.