a
    ¡˜ëjmn  ã                   @   s  d Z ddlZddlZddlZddlZddlmZ dejdd…   krNdk r`n nddlmZ	 nXejdd… dkr¤zddlmZ	 W q¸ e
y    ddlmZ	 Y q¸0 nddlmZ eeƒZ	ejdd… dkZerÖddlZd	Zd	Zd	Zd	Zd
Ze�rdddlmZmZmZmZmZmZmZmZmZ ddlmZmZ ejdd… dk�rZddlm Z  ee ej!fZ"nefZ"�nRddlmZm#Z#mZmZm$Z$mZm%Z%m&Z& zddlm'Z'm(Z( W n$ e
�yÄ   eeƒZ'd
Zd	ZY n0 zddlm)Z) W n> e
�y   zddlm)Z) W n e
�y   d
ZY n0 Y n0 zddlmZ W n> e
�yd   zddlmZ W n e
�y^   d
ZY n0 Y n0 zddlmZ W n> e
�y´   zddlmZ W n e
�y®   d
ZY n0 Y n0 dd„ Z*dd„ Z+dd„ Z,dd„ Z-dd„ Z.dd„ Z/z
ej0Z1W n e2�y   dZ1Y n0 d d!„ Z3ehZ4e5ed"ƒ�r0e4 6ej¡ d#d$„ Z7d%d&„ Z8d'd(„ Z9d)d*„ Z:d+d,„ Z;d-d.„ Z<d/d0„ Z=d1d2„ Z>d3d4„ Z?d5d6„ Z@d[d7d8„ZAd9d:„ ZBd;d<„ ZCd=d>„ ZDd?d@„ ZEdAdB„ ZFdCdD„ ZGdEdF„ ZHdGdH„ ZId\dIdJ„ZJd]dKdL„ZKd^dMdN„ZLd_dOdP„ZMdQdR„ ZNdSdT„ ZOdUdV„ ZPdWdX„ ZQdYdZ„ ZRdS )`z¢Defines experimental API for runtime inspection of types defined
in the standard "typing" module.

Example usage::
    from typing_inspect import is_generic_type
é    N)Ú_TypedDictMeta)é   é   r   r   )r   é	   é   )Ú	TypedDict)r   é   r   TF)	ÚGenericÚCallableÚUnionÚTypeVarÚClassVarÚTupleÚ_GenericAliasÚ
ForwardRefÚNewType)ÚFinalÚLiteral)r   r   r   )Ú_SpecialGenericAlias)r
   ÚCallableMetar   r   Ú	TupleMetar   ÚGenericMetaÚ_ForwardRef)Ú_UnionÚ	_ClassVar)Ú_Final)r   )r   c                 C   s4   t | tƒsJ ‚t| dƒr| jS | jdur0| j} q| S )z@This function exists for compatibility with old typing versions.Ú_gorgN)Ú
isinstancer   Úhasattrr   Ú
__origin__©Úcls© r"   úM/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/typing_inspect.pyr   \   s    

r   c                 C   sR   t r8t| tƒrt| tƒp6t| tƒo6| jttt	t
jjfvS t| tƒoPt| ttfƒ S )aË  Test if the given type is a generic type. This includes Generic itself, but
    excludes special typing constructs such as Union, Tuple, Callable, ClassVar.
    Examples::

        is_generic_type(int) == False
        is_generic_type(Union[int, str]) == False
        is_generic_type(Union[int, T]) == False
        is_generic_type(ClassVar[List[int]]) == False
        is_generic_type(Callable[..., T]) == False

        is_generic_type(Generic) == True
        is_generic_type(Generic[T]) == True
        is_generic_type(Iterable[int]) == True
        is_generic_type(Mapping) == True
        is_generic_type(MutableMapping[T, List[int]]) == True
        is_generic_type(Sequence[Union[str, bytes]]) == True
    )Ú
NEW_TYPINGr   ÚtypeÚ
issubclassr	   ÚtypingGenericAliasr   r   Útupler   ÚcollectionsÚabcr
   r   r   r   ©Útpr"   r"   r#   Úis_generic_typef   s    
þ
ÿr-   c                 C   sR   t rF| tu pDt| tƒr$| jtjju pDt| tƒoDt| t	ƒoDt| tjjƒS t| ƒt
u S )a˜  Test if the type is a generic callable type, including subclasses
    excluding non-generic types and callables.
    Examples::

        is_callable_type(int) == False
        is_callable_type(type) == False
        is_callable_type(Callable) == True
        is_callable_type(Callable[..., int]) == True
        is_callable_type(Callable[[int, int], Iterable[str]]) == True
        class MyClass(Callable[[int], int]):
            ...
        is_callable_type(MyClass) == True

    For more general tests use callable(), for more precise test
    (excluding subclasses) use::

        get_origin(tp) is collections.abc.Callable  # Callable prior to Python 3.7
    )r$   r
   r   r'   r   r)   r*   r%   r&   r	   r   r+   r"   r"   r#   Úis_callable_type€   s    ÿýr.   c                 C   sJ   t r>| tu p<t| tƒr | jtu p<t| tƒo<t| tƒo<t| tƒS t| ƒt	u S )a   Test if the type is a generic tuple type, including subclasses excluding
    non-generic classes.
    Examples::

        is_tuple_type(int) == False
        is_tuple_type(tuple) == False
        is_tuple_type(Tuple) == True
        is_tuple_type(Tuple[str, int]) == True
        class MyClass(Tuple[str, int]):
            ...
        is_tuple_type(MyClass) == True

    For more general tests use issubclass(..., tuple), for more precise test
    (excluding subclasses) use::

        get_origin(tp) is tuple  # Tuple prior to Python 3.7
    )
r$   r   r   r'   r   r(   r%   r&   r	   r   r+   r"   r"   r#   Úis_tuple_type›   s    ÿýr/   c                 C   s:   | t dƒu rdS t| ƒr2tdd„ t| dd�D ƒƒS dS dS )a  Test if the type is type(None), or is a direct union with it, such as Optional[T].

    NOTE: this method inspects nested `Union` arguments but not `TypeVar` definition
    bounds and constraints. So it will return `False` if
     - `tp` is a `TypeVar` bound, or constrained to, an optional type
     - `tp` is a `Union` to a `TypeVar` bound or constrained to an optional type,
     - `tp` refers to a *nested* `Union` containing an optional type or one of the above.

    Users wishing to check for optionality in types relying on type variables might wish
    to use this method in combination with `get_constraints` and `get_bound`
    NTc                 s   s   | ]}t |ƒV  qd S ©N)Úis_optional_type)Ú.0Úttr"   r"   r#   Ú	<genexpr>Å   ó    z#is_optional_type.<locals>.<genexpr>)ÚevaluateF)r%   Úis_union_typeÚanyÚget_argsr+   r"   r"   r#   r1   µ   s
    r1   c                 C   s0   t r | tu pt| tƒo| jtu S to.t| ƒtu S )z¥Test if the type is a final type. Examples::

        is_final_type(int) == False
        is_final_type(Final) == True
        is_final_type(Final[int]) == True
    )r$   r   r   r'   r   Ú
WITH_FINALr%   r   r+   r"   r"   r#   Úis_final_typeÊ   s
    ÿr;   c                 C   s:   t r.| tu p,t| tƒr | jtu p,to,t| tƒS t| ƒtu S )a)  Test if the type is a union type. Examples::

        is_union_type(int) == False
        is_union_type(Union) == True
        is_union_type(Union[int, int]) == False
        is_union_type(Union[T, int]) == True
        is_union_type(int | int) == False
        is_union_type(T | int) == True
    )r$   r   r   r'   r   ÚMaybeUnionTyper%   r   r+   r"   r"   r#   r7   Ý   s    
ÿþr7   r   c                 C   s4   t r | tv pt| tƒo| jtv S to2t| ƒttƒu S r0   )r$   ÚLITERALSr   r'   r   ÚWITH_LITERALr%   r   r+   r"   r"   r#   Úis_literal_typeó   s
    ÿr?   c                 C   s   t | ƒtu S )z§Test if the type represents a type variable. Examples::

        is_typevar(int) == False
        is_typevar(T) == True
        is_typevar(Union[T, int]) == False
    )r%   r   r+   r"   r"   r#   Ú
is_typevarú   s    r@   c                 C   s8   t r | tu pt| tƒo| jtu S tr0t| ƒtu S dS dS )zàTest if the type represents a class variable. Examples::

        is_classvar(int) == False
        is_classvar(ClassVar) == True
        is_classvar(ClassVar[int]) == True
        is_classvar(ClassVar[List[T]]) == True
    FN)r$   r   r   r'   r   ÚWITH_CLASSVARr%   r   r+   r"   r"   r#   Úis_classvar  s    ÿrB   c                 C   sà   t sdS tjdd… dkrDtjjdkrD| ttjfv pBt| ttjfƒS tjdd… dkrºzt| tjƒ}W n tyx   Y n
0 |r‚|S | ttjfv p¸t| ddƒduo¸t| dd	ƒd
ko¸| j	dv S | tu pÚt| ddƒduoÚ| j	dv S dS )zýTests if the type represents a distinct type. Examples::

        is_new_type(int) == False
        is_new_type(NewType) == True
        is_new_type(NewType('Age', int)) == True
        is_new_type(NewType('Scores', List[Dict[str, float]])) == True
    FNr   )r   é
   r   Úbeta)r   r   r   Ú__supertype__Ú__qualname__Ú zNewType.<locals>.new_type)ÚtypingÚtyping_extensions)
ÚWITH_NEWTYPEÚsysÚversion_infoÚreleaselevelr   rI   r   Ú	TypeErrorÚgetattrÚ
__module__)r,   Úresr"   r"   r#   Úis_new_type  s.    ÿÿýþrR   c                 C   s   t st| tƒS t| tƒS )zÎTests if the type is a :class:`typing.ForwardRef`. Examples::

        u = Union["Milk", Way]
        args = get_args(u)
        is_forward_ref(args[0]) == True
        is_forward_ref(args[1]) == False
    )r$   r   r   r   r+   r"   r"   r#   Úis_forward_ref6  s    
rS   c                 C   s:   t rtdƒ‚tƒ }t| d|ƒ}||u r*dS |du r6| S |S )aÍ  Get the last base of (multiply) subscripted type. Supports generic types,
    Union, Callable, and Tuple. Returns None for unsupported types.
    Examples::

        get_last_origin(int) == None
        get_last_origin(ClassVar[int]) == None
        get_last_origin(Generic[T]) == Generic
        get_last_origin(Union[T, int][str]) == Union[T, int]
        get_last_origin(List[Tuple[T, T]][int]) == List[Tuple[T, T]]
        get_last_origin(List) == List
    zEThis function is only supported in Python 3.6, use get_origin insteadr   N)r$   Ú
ValueErrorÚobjectrO   )r,   ÚsentinelÚoriginr"   r"   r#   Úget_last_originC  s    rX   c                 C   sz   t r2t| tƒr"| jtur| jS dS | tu r.tS dS t| tƒrDt| ƒS t| ƒrPt	S t
| ƒr\tS t| ƒrvt rr| jpp| S tS dS )aª  Get the unsubscripted version of a type. Supports generic types, Union,
    Callable, and Tuple. Returns None for unsupported types. Examples::

        get_origin(int) == None
        get_origin(ClassVar[int]) == None
        get_origin(Generic) == Generic
        get_origin(Generic[T]) == Generic
        get_origin(Union[T, int]) == Union
        get_origin(List[Tuple[T, T]][int]) == list  # List prior to Python 3.7
    N)r$   r   r'   r   r   r	   r   r   r7   r   r/   r   r?   r   r+   r"   r"   r#   Ú
get_origin[  s"    


rY   c                 C   s¬  t �rt| ƒr@g }| jdur"| jndD ]}|t|ƒ7 }q&t|ƒS t| ƒrzg }| jdur\| jndD ]}|t|ƒ7 }q`t|ƒS t| ƒ�rg }| j}|du ršdS |D ]\}t|ƒr²t	|ƒn|fD ]@}t
|ƒrÚt|tƒsÚtd| ƒ‚|du ræg }||vr¸| |¡ q¸qž|du�rt|ƒS dS ndS nŽt�rft| tƒ�r8t| dƒ�sZt| tƒ�r`t| tƒ�r`| tu�r`| jS dS nBt| ƒ�sŽt| ƒ�sŽt| ƒ�sŽt| ƒ�r¤| jdu�r | jS dS dS dS )a>  Return type parameters of a parameterizable type as a tuple
    in lexicographic order. Parameterizable types are generic types,
    unions, tuple types and callable types. Examples::

        get_parameters(int) == ()
        get_parameters(Generic) == ()
        get_parameters(Union) == ()
        get_parameters(List[int]) == ()

        get_parameters(Generic[T]) == (T,)
        get_parameters(Tuple[List[T], List[S_co]]) == (T, S_co)
        get_parameters(Union[S_co, Tuple[T, T]][int, U]) == (U,)
        get_parameters(Mapping[T, Tuple[S_co, T]]) == (T, S_co)
    Nr"   zKCannot inherit from a generic class parameterized with non-type-variable %sÚ__parameters__)ÚLEGACY_TYPINGr7   Ú__union_params__Úget_parametersr(   r/   Ú__tuple_params__r-   rZ   r9   Ú_has_type_varr   r   rN   Úappendr$   r'   r   r%   r&   r	   r.   )r,   ÚparamsÚargZbase_paramsZbp_Zbpr"   r"   r#   r]   z  sn    
þÿ
þýûûúÿÿþþr]   c                 C   s>  t rtdƒ‚�n*t| ƒr.| jdur*| jfS dS t| ƒr‚z$| jdurXt| jƒdkrX| jW S W n tyl   Y n0 | jdur~| jS dS t	| ƒrÊz| jdurœ| jndW S  tyÆ   | j
dur¾| j
nd Y S 0 npt| ƒræ| jdurâ| jS dS t| ƒ�r6z| jdu�r| jndW S  t�y2   | jdu�r*| jnd Y S 0 ndS dS )a¿  Get last arguments of (multiply) subscripted type.
       Parameters for Callable are flattened. Examples::

        get_last_args(int) == ()
        get_last_args(Union) == ()
        get_last_args(ClassVar[int]) == (int,)
        get_last_args(Union[T, int]) == (T, int)
        get_last_args(Iterable[Tuple[T, S]][int, T]) == (int, T)
        get_last_args(Callable[[T], int]) == (T, int)
        get_last_args(Callable[[], int]) == (int,)
    zCThis function is only supported in Python 3.6, use get_args insteadNr"   r   )r$   rT   rB   Ú__type__r-   Ú__args__ÚlenÚAttributeErrorrZ   r7   r\   r.   r/   r^   r+   r"   r"   r#   Úget_last_args¿  s0    
rg   c              
   C   sÞ   g }| D ]Ì}t |tƒs"| |¡ qt|d ƒrªt|dd… ƒ}t|ƒdkrb| tg |d f ¡ qÔ|d tu r†| td|d f ¡ qÔ| tt|dd… ƒ|d f ¡ q| t	|d ƒ 
|d t|dd… ƒ¡¡ qt|ƒS )zInternal helper for get_args.r   é   Nr   .éÿÿÿÿ)r   r(   r`   r.   Ú
_eval_argsre   r
   ÚEllipsisÚlistr%   Ú__getitem__)ÚargsrQ   rb   Zcallable_argsr"   r"   r#   rj   ê  s    
$,rj   c                 C   s¸  t r‚|dur|stdƒ‚t| tƒrjt| dƒrj| j}t| ƒtjj	u rf|d t
urft|dd… ƒ|d f}|S tr~t| tƒr~| jS dS t| ƒs’t| ƒr¨| jdur¤| jfS dS t| ƒrº| jp¸dS t| ƒsÜt| ƒsÜt| ƒsÜt| ƒ�r´z|  ¡ }W nV t�y>   t| ƒ�rt| ƒ}n.t| ƒ�r t| ƒ}nt| ƒ�r4t| ƒ}nY dS Y n0 t|tƒ�r´t|ƒdk�r´|�sl|dd… S t|dd… ƒ}t| ƒt	u �r°|d t
u�r°t|dd… ƒ|d f}|S dS )a¬  Get type arguments with all substitutions performed. For unions,
    basic simplifications used by Union constructor are performed.
    On versions prior to 3.7 if `evaluate` is False (default),
    report result as nested tuple, this matches
    the internal representation of types. If `evaluate` is True
    (or if Python version is 3.7 or greater), then all
    type parameters are applied (this could be time and memory expensive).
    Examples::

        get_args(int) == ()
        get_args(Union[int, Union[T, int], str][int]) == (int, str)
        get_args(Union[int, Tuple[T, int]][str]) == (int, (Tuple, str, int))

        get_args(Union[int, Tuple[T, int]][str], evaluate=True) ==                  (int, Tuple[str, int])
        get_args(Dict[int, Tuple[T, T]][Optional[int]], evaluate=True) ==                  (int, Tuple[Optional[int], Optional[int]])
        get_args(Callable[[], T][int], evaluate=True) == ([], int,)
    Nz*evaluate can only be True in Python >= 3.7rd   r   ri   r"   rh   )r$   rT   r   r'   r   rd   rY   r)   r*   r
   rk   rl   r<   rB   r;   rc   r?   Z
__values__r-   r7   r.   r/   Ú
_subs_treerf   Ú_union_subs_treeÚ_generic_subs_treeÚ_tuple_subs_treer(   re   rj   )r,   r6   rQ   Útreer"   r"   r#   r9   ý  sR    
ÿÿþþ





r9   c                 C   s(   t | ƒrt| ddƒS tdt| ƒ ƒ‚dS )zÙReturn the type bound to a `TypeVar` if any.

    It the type is not a `TypeVar`, a `TypeError` is raised.
    Examples::

        get_bound(TypeVar('T')) == None
        get_bound(TypeVar('T', bound=int)) == int
    Ú	__bound__Nútype is not a `TypeVar`: ©r@   rO   rN   Ústrr+   r"   r"   r#   Ú	get_boundA  s    
rx   c                 C   s(   t | ƒrt| ddƒS tdt| ƒ ƒ‚dS )zêReturns the constraints of a `TypeVar` if any.

    It the type is not a `TypeVar`, a `TypeError` is raised
    Examples::

        get_constraints(TypeVar('T')) == ()
        get_constraints(TypeVar('T', int, str)) == (int, str)
    Ú__constraints__r"   ru   Nrv   r+   r"   r"   r#   Úget_constraintsQ  s    
rz   c                 C   s    t | ddƒ}|dur|S t| ƒS )a6  Get the generic type of an object if possible, or runtime class otherwise.
    Examples::

        class Node(Generic[T]):
            ...
        type(Node[int]()) == Node
        get_generic_type(Node[int]()) == Node[int]
        get_generic_type(Node[T]()) == Node[T]
        get_generic_type(1) == int
    Ú__orig_class__N)rO   r%   )ÚobjZgen_typer"   r"   r#   Úget_generic_typea  s    r}   c                 C   s(   t rtdd„ | jD ƒƒS t| ddƒS dS )a  Get generic base types of a type or empty tuple if not possible.
    Example::

        class MyClass(List[int], Mapping[str, List[int]]):
            ...
        MyClass.__bases__ == (List, Mapping)
        get_generic_bases(MyClass) == (List[int], Mapping[str, List[int]])
    c                 s   s   | ]}t |tƒr|V  qd S r0   )r   r   ©r2   Útr"   r"   r#   r4   {  r5   z$get_generic_bases.<locals>.<genexpr>Ú__orig_bases__r"   N)r[   r(   Ú	__bases__rO   r+   r"   r"   r#   Úget_generic_basesq  s    	r‚   c                 C   s   t | ttfƒr| j ¡ S dS )aƒ  If td is a TypedDict class, return a dictionary mapping the typed keys to types.
    Otherwise, return None. Examples::

        class TD(TypedDict):
            x: int
            y: int
        class Other(dict):
            x: int
            y: int

        typed_dict_keys(TD) == {'x': int, 'y': int}
        typed_dict_keys(dict) == None
        typed_dict_keys(Other) == None
    N)r   Ú_TypedDictMeta_MypyÚ_TypedDictMeta_TEÚ__annotations__Úcopy)Útdr"   r"   r#   Útyped_dict_keys€  s    
rˆ   c                 C   s   t | ƒr| jS dS )a  
    If fr is a ForwardRef, return the string representation of the forward reference.
    Otherwise return None. Examples::

        tp = List["FRef"]
        fr = get_args(tp)[0]
        get_forward_arg(fr) == "FRef"
        get_forward_arg(tp) == None
    N)rS   Ú__forward_arg__)Úfrr"   r"   r#   Úget_forward_arg”  s    
r‹   c                 C   s|   |du rg }t | ƒr t| ||ƒS t| ƒr4t| ||ƒS t| ƒrHt| ||ƒS t| tƒrxt|ƒD ]\}}| |krZ||   S qZ| S )zbackport of _replace_argN)	r7   rp   r/   rr   r-   rq   r   r   Ú	enumerate)rb   Útvarsrn   ÚiZtvarr"   r"   r#   Ú_replace_arg£  s    
r�   c                    s  g }| D ]\}t |tƒr$| |j¡ qt |tƒrZt|ƒdkrZ|d tu rZ| |dd… ¡ q| |¡ qt|ƒ‰ tˆ ƒt|ƒk r¸g }|D ] }|ˆ v r†| |¡ ˆ  	|¡ q†|}ˆ r¸J ˆ ƒ‚t|ƒ‰ |D ]6‰t ˆt
ƒsÔqÄt‡fdd„ˆ ˆh D ƒƒrÄˆ  	ˆ¡ qÄt‡ fdd„|D ƒƒS )z backport of _remove_dups_flattenr   rh   Nc                 3   sB   | ]:}t |tƒrt|ƒd ust |tƒst |tƒo8tˆ |ƒV  qd S r0   )r   r   rY   r   r%   r&   )r2   Út2)Út1r"   r#   r4   Õ  s
   

üz'_remove_dups_flatten.<locals>.<genexpr>c                 3   s   | ]}|ˆ v r|V  qd S r0   r"   r~   )Ú
all_paramsr"   r#   r4   Û  r5   )r   r   Úextendr\   r(   re   r   r`   ÚsetÚremover%   r8   )Ú
parametersra   ÚpÚ
new_paramsr   r"   )r’   r‘   r#   Ú_remove_dups_flatten¶  s2    
"

ÿr™   c                 C   s¶   dd„ }|| ƒ}|du r,t | ƒs,t| ƒs,| S g }||ƒdurP| |¡ ||ƒ}q0g }dd„ }|| ƒD ]}| t|||ƒ¡ qd|D ]0}	g }
||	ƒD ]}|
 t|t|	ƒ|ƒ¡ q�|
}q€|S )z;backport of typing._subs_tree, adapted for legacy versions c                 S   s"   z| j W S  ty   Y d S 0 d S r0   )r   rf   r    r"   r"   r#   Ú_get_originà  s    z_subs_tree.<locals>._get_originNc                 S   sR   t | ƒr| j}n2t| ƒr | j}n"z
| j}W n ty@   d}Y n0 |d urN|S dS )Nr"   )r7   r\   r/   r^   rd   rf   )r!   Zcls_argsr"   r"   r#   Ú	_get_argsô  s    

z_subs_tree.<locals>._get_args)r7   r/   r`   r�   r]   )r!   r�   rn   rš   ÚcurrentZ
orig_chainÚ	tree_argsr›   rb   ZoclsZnew_tree_argsr"   r"   r#   ro   Þ  s&    

ro   c                 C   s>   | t u rt S t| ||ƒ}t|ƒ}t|ƒdkr4|d S t f| S )z backport of Union._subs_tree rh   r   )r   ro   r™   re   ©r,   r�   rn   r�   r"   r"   r#   rp     s    rp   c                 C   s,   | j du r| S t| ||ƒ}t| ƒft|ƒ S )z$ backport of GenericMeta._subs_tree N)r   ro   r   r(   rž   r"   r"   r#   rq     s    
rq   c                 C   s&   | t u rt S t| ||ƒ}t ft|ƒ S )z7 ad-hoc function (inspired by union) for legacy typing )r   ro   r(   rž   r"   r"   r#   rr     s    rr   c                 C   sT   | d u rdS t | ƒrt| ƒS t| ƒr,t| ƒS t| ƒr<t| ƒS t| ƒrLt| ƒS dS d S )NF)r7   Ú_union_has_type_varr/   Ú_tuple_has_type_varr-   Ú_generic_has_type_varr.   Ú_callable_has_type_var)r   r"   r"   r#   r_   '  s    r_   c                 C   s$   | j r | j D ]}t|ƒr dS qdS ©NTF)r\   r_   ©r,   r   r"   r"   r#   rŸ   6  s
    
rŸ   c                 C   s$   | j r | j D ]}t|ƒr dS qdS r£   )r^   r_   r¤   r"   r"   r#   r    >  s
    
r    c                 C   s*   | j r | j D ]}t|ƒr dS qt| jƒS )NT)rd   r_   Z
__result__r¤   r"   r"   r#   r¢   F  s
    
r¢   c                 C   s$   | j r | j D ]}t|ƒr dS qdS r£   )rZ   r_   r¤   r"   r"   r#   r¡   N  s
    
r¡   )N)NN)NN)NN)NN)SÚ__doc__rK   ÚtypesrH   rI   Zmypy_extensionsr   rƒ   rL   r„   ÚImportErrorr   r%   r$   Úcollections.abcr)   r:   r>   rA   rJ   r[   r	   r
   r   r   r   r   r   r   r   r   r   r   ÚGenericAliasr'   r   r   r   r   r   r   r   r   r-   r.   r/   r1   r;   Z	UnionTyper<   rf   r7   r=   r   Úaddr?   r@   rB   rR   rS   rX   rY   r]   rg   rj   r9   rx   rz   r}   r‚   rˆ   r‹   r�   r™   ro   rp   rq   rr   r_   rŸ   r    r¢   r¡   r"   r"   r"   r#   Ú<module>   sÆ   	",
(



 E+
D(
-


