(t, globalns, localns, recursive_guard=frozenset())
return t
Evaluate all forward references in the given type t.
    For use of globalns and localns see the docstring for get_type_hints().
    recursive_guard is used to prevent prevent infinite recursion
    with recursive ForwardRef.
Evaluate all forward references in the given type t.
    For use of globalns and localns see the docstring for get_type_hints().
    recursive_guard is used to prevent prevent infinite recursion
    with recursive ForwardRef.
Evaluate all forward references in the given type t . For use of globalns and localns see the docstring for get_type_hints () . recursive_guard is used to prevent prevent infinite recursion with recursive ForwardRef .
def _eval_type(t, globalns, localns, recursive_guard=frozenset()):
    """Evaluate all forward references in the given type t.
    For use of globalns and localns see the docstring for get_type_hints().
    recursive_guard is used to prevent prevent infinite recursion
    with recursive ForwardRef.
    """
    if isinstance(t, ForwardRef):
        return t._evaluate(globalns, localns, recursive_guard)
    if isinstance(t, (_GenericAlias, GenericAlias, types.UnionType)):
        ev_args = tuple(_eval_type(a, globalns, localns, recursive_guard) for a in t.__args__)
        if ev_args == t.__args__:
            return t
        if isinstance(t, GenericAlias):
            return GenericAlias(t.__origin__, ev_args)
        if isinstance(t, types.UnionType):
            return functools.reduce(operator.or_, ev_args)
        else:
            return t.copy_with(ev_args)
    return t
def _eval_type ( t , globalns , localns , recursive_guard = frozenset ( ) ) : if isinstance ( t , ForwardRef ) : return t . _evaluate ( globalns , localns , recursive_guard ) if isinstance ( t , ( _GenericAlias , GenericAlias , types . UnionType ) ) : ev_args = tuple ( _eval_type ( a , globalns , localns , recursive_guard ) for a in t . __args__ ) if ev_args == t . __args__ : return t if isinstance ( t , GenericAlias ) : return GenericAlias ( t . __origin__ , ev_args ) if isinstance ( t , types . UnionType ) : return functools . reduce ( operator . or_ , ev_args ) else : return t . copy_with ( ev_args ) return t