fqr.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.

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.