(t)
return t
Strips the annotations from a given type.
Strips the annotations from a given type.
Strips the annotations from a given type .
def _strip_annotations(t):
    """Strips the annotations from a given type.
    """
    if isinstance(t, _AnnotatedAlias):
        return _strip_annotations(t.__origin__)
    if isinstance(t, _GenericAlias):
        stripped_args = tuple(_strip_annotations(a) for a in t.__args__)
        if stripped_args == t.__args__:
            return t
        return t.copy_with(stripped_args)
    if isinstance(t, GenericAlias):
        stripped_args = tuple(_strip_annotations(a) for a in t.__args__)
        if stripped_args == t.__args__:
            return t
        return GenericAlias(t.__origin__, stripped_args)
    if isinstance(t, types.UnionType):
        stripped_args = tuple(_strip_annotations(a) for a in t.__args__)
        if stripped_args == t.__args__:
            return t
        return functools.reduce(operator.or_, stripped_args)

    return t
def _strip_annotations ( t ) : if isinstance ( t , _AnnotatedAlias ) : return _strip_annotations ( t . __origin__ ) if isinstance ( t , _GenericAlias ) : stripped_args = tuple ( _strip_annotations ( a ) for a in t . __args__ ) if stripped_args == t . __args__ : return t return t . copy_with ( stripped_args ) if isinstance ( t , GenericAlias ) : stripped_args = tuple ( _strip_annotations ( a ) for a in t . __args__ ) if stripped_args == t . __args__ : return t return GenericAlias ( t . __origin__ , stripped_args ) if isinstance ( t , types . UnionType ) : stripped_args = tuple ( _strip_annotations ( a ) for a in t . __args__ ) if stripped_args == t . __args__ : return t return functools . reduce ( operator . or_ , stripped_args ) return t