a
    ze,                    @   s  d dl mZmZ d dlZd dlZd dlZd dlZd dlZd dlZ	d dl
Z
d dlZd dlmZmZmZmZ g dZdddddZdddd
dZdd Zdd Zdd Zdd Zdd Zdd Zg ZdddddZe fddZG dd dZG dd  d ZG d!d" d"ed	d#ZG d$d% d%ed	d#Z ed&d' Z!ed(d) Z"ed*d+ Z#ed,d- Z$ed.d/ Z%ed0d1 Z&e ed	dd2d3 Z'G d4d5 d5ed	d#Z(G d6d7 d7eed	d#Z)d8d9 Z*G d:d; d;ed	d#Z+G d<d= d=e+d	d#Z,G d>d? d?e+d	d#Z-G d@dA dAe,d	d#Z.G dBdC dCe-d	d#Z/G dDdE dEe-d	d#Z0G dFdG dGe,d	d#Z1dHdI Z2G dJdK dKe,d	d#Z3G dLdM dMZ4G dNdO dOZ5G dPdQ dQZ6g dRZ7g dSZ8e7e8 dTg Z9dUdV Z:dWdX Z;dYdZ Z<d[d\ Z=g d]d^d_gd`Z>G dadb dbeZ?G dcdd dde4e?deZ@G dfdg dge,d	d#ZAG dhdi diZBdjdk ZCdldm ZDdndo ZEejFejGejHejIeeefZJddpdqZKdrds ZLdtdu ZMdvdw ZNdxdy ZOdzd{ ZPd|d} ZQd~d ZRdd ZSe)dZTe)dZUe)dZVe)dd	dZWe)dd	dZXe)dd	dZYe)dd	dZZe)dd	e[dZ\e)de]e^Z_e-Z`e`ej jad Zae`ej jbdZbe`ej jcdZce`ej jddZde`ej jedZee`ej jfdZfe`ej jgdZge`ej jhdZhe`ej jid Zie`ej jjdZje`ej jkdZke/ej jldZldel_me`ej jndddZoe`ej jpdZpe`ej jqdZqe`ej jrdZre`ej jsdZse`ej jtdZte`ej jud Zue0evddddZwdew_me`exddddZye`ejzdddZ{e`e|ddddZne`eddddZ}e`ej j~dZ~e`ej jdZe`ej jdZe`ej jdZe`ejdddZe`ejdddZe`eddddZe`ejdddZe`ejdZe`ejdZe`ejdZe`ej jdZe`ej jdZe`e[ddddZde_meCG dd de@ZeCG dd de@ZeCG dd de@ZeCG dd de@ZeCG dd de@ZeCG dd de@eW ZeCG dd de@eW ZdddZeh dZeh dZG dd de[ZdddZe[eddi Zdd Zee_G dd de[Zdd	dddZe[eddi Zdd e_ddÄ Ze^ZdZG ddń de4e_ ZG ddǄ dee] ZG ddɄ dee^ ZG dd˄ d˃Zed e_ee
jej< e`e	jdZe`e	jdZG dd΄ d΃Zed e_ee
jej< dS )    )abstractmethodABCMetaN)WrapperDescriptorTypeMethodWrapperTypeMethodDescriptorTypeGenericAlias)M	AnnotatedAnyCallableClassVarFinal
ForwardRefGenericLiteralOptionalProtocolTupleTypeTypeVarUnionAbstractSet
ByteString	ContainerContextManagerHashable	ItemsViewIterableIteratorKeysViewMappingMappingViewMutableMappingMutableSequence
MutableSetSequenceSized
ValuesView	AwaitableAsyncIteratorAsyncIterable	Coroutine
CollectionAsyncGeneratorAsyncContextManager
ReversibleSupportsAbsSupportsBytesSupportsComplexSupportsFloatSupportsIndexSupportsIntSupportsRoundChainMapCounterDequeDictDefaultDictListOrderedDictSet	FrozenSet
NamedTuple	TypedDict	GeneratorBinaryIOIOMatchPatternTextIOAnyStrcastfinalget_args
get_originget_type_hintsNewTypeno_type_checkno_type_check_decoratorNoReturnoverloadruntime_checkableTextTYPE_CHECKINGFallow_special_formsc                C   s,   | d u rt d S t| tr(t| ||dS | S )N)moduleis_class)type
isinstancestrr   )argrW   rV    r]   /usr/lib/python3.9/typing.py_type_convert   s
    
r_   Tc                C   s   t tf}|s$|tf7 }|r$|tf7 }t| ||d} t| trT| j|v rTt|  d| t	t
tfv rf| S t| ts|| t tfv rtd|  dt| tttfr| S t| st| d| dd| S )N)rW   rV   z is not valid as type argumentzPlain z Got z.100.)r   r   r   r   r_   rZ   _GenericAlias
__origin__	TypeErrorr	   rP   _SpecialFormrY   r   r   callable)r\   msgis_argumentrW   rV   invalid_generic_formsr]   r]   r^   _type_check   s&    


ri   c                 C   sf   t | tjrt| S t | tr@| jdkr.| jS | j d| j S | du rLdS t | tjr^| jS t| S )Nbuiltinsr`   .z...)	rZ   typesr   reprrY   
__module____qualname__FunctionType__name__)objr]   r]   r^   
_type_repr   s    

rr   c                    sZ   g  | D ]H}t |tr(| vr( | t |ttfr  fdd|jD  qt S )Nc                    s   g | ]}| vr|qS r]   r]   .0ttvarsr]   r^   
<listcomp>       z&_collect_type_vars.<locals>.<listcomp>)rZ   r   appendra   r   extend__parameters__tuple)rk   ru   r]   rv   r^   _collect_type_vars   s    
r~   c              	   C   sR   |st |  dt|}||krNt d||kr2dnd d|  d| d| d S )Nz is not a generic classzToo manyfewz parameters for z	; actual z, expected )rc   len)cls
parameterselenalenr]   r]   r^   _check_generic   s    r   c                 C   sJ   t | }t|t| k rFg }| D ] }||v r || || q |} | S N)setr   rz   remove)params
all_params
new_paramsru   r]   r]   r^   _deduplicate   s    
r   c                 C   sr   g }| D ]\}t |tr$||j qt |trZt|dkrZ|d tu rZ||dd   q|| qtt|S )Nr      )	rZ   _UnionGenericAliasr{   __args__r}   r   r   rz   r   r   r   pr]   r]   r^   _remove_dups_flatten   s    
"r   c                 C   s8   g }| D ]&}t |tr$||j q|| qt|S r   )rZ   _LiteralGenericAliasr{   r   rz   r}   r   r]   r]   r^   _flatten_literal_params   s    
r   typedc                  s     fdd}| d ur|| S |S )Nc                    s8   t jd t j t  fdd}|S )Nr   c                     s2   z | i |W S  t y"   Y n0 | i |S r   rc   argskwdscachedfuncr]   r^   inner  s
    z+_tp_cache.<locals>.decorator.<locals>.inner)	functools	lru_cache	_cleanupsrz   cache_clearwraps)r   r   r   r   r^   	decorator  s
    z_tp_cache.<locals>.decoratorr]   )r   r   r   r]   r   r^   	_tp_cache  s    r   c                    st   t | tr|  S t | ttfrpt fdd| jD }|| jkrP| S t | trft| j|S | |S | S )Nc                 3   s   | ]}t | V  qd S r   )
_eval_typert   aglobalnslocalnsrecursive_guardr]   r^   	<genexpr>&  ry   z_eval_type.<locals>.<genexpr>)	rZ   r   	_evaluatera   r   r}   r   rb   	copy_with)ru   r   r   r   ev_argsr]   r   r^   r     s    



r   c                   @   s   e Zd ZdZdd ZdS )_Final)__weakref__c                O   s   d|vrt dd S )N_rootz&Cannot subclass special typing classesr   selfr   r   r]   r]   r^   __init_subclass__5  s    z_Final.__init_subclass__N)rp   rm   rn   	__slots__r   r]   r]   r]   r^   r   0  s   r   c                   @   s    e Zd ZdZdd Zdd ZdS )
_Immutabler]   c                 C   s   | S r   r]   r   r]   r]   r^   __copy__=  s    z_Immutable.__copy__c                 C   s   | S r   r]   )r   memor]   r]   r^   __deepcopy__@  s    z_Immutable.__deepcopy__N)rp   rm   rn   r   r   r   r]   r]   r]   r^   r   9  s   r   c                   @   sT   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
edd ZdS )rd   )_name__doc___getitemc                 C   s   || _ |j| _|j| _d S r   )r   rp   r   r   )r   getitemr]   r]   r^   __init__I  s    z_SpecialForm.__init__c                 C   s   t d| d S )NzCannot subclass r   )r   basesr]   r]   r^   __mro_entries__N  s    z_SpecialForm.__mro_entries__c                 C   s
   d| j  S Ntyping.r   r   r]   r]   r^   __repr__Q  s    z_SpecialForm.__repr__c                 C   s   | j S r   r   r   r]   r]   r^   
__reduce__T  s    z_SpecialForm.__reduce__c                 O   s   t d| d S )NzCannot instantiate r   r   r]   r]   r^   __call__W  s    z_SpecialForm.__call__c                 C   s   t |  dd S )Nz! cannot be used with isinstance()r   r   rq   r]   r]   r^   __instancecheck__Z  s    z_SpecialForm.__instancecheck__c                 C   s   t |  dd S )Nz! cannot be used with issubclass()r   r   r   r]   r]   r^   __subclasscheck__]  s    z_SpecialForm.__subclasscheck__c                 C   s   |  | |S r   )r   r   r   r]   r]   r^   __getitem__`  s    z_SpecialForm.__getitem__N)rp   rm   rn   r   r   r   r   r   r   r   r   r   r   r]   r]   r]   r^   rd   F  s   rd   )r   c                   @   s   e Zd Zdd ZdS )_LiteralSpecialFormc                 C   s"   t |ts|f}| j| g|R  S r   )rZ   r}   r   r   r]   r]   r^   r   f  s    
z_LiteralSpecialForm.__getitem__N)rp   rm   rn   r   r]   r]   r]   r^   r   e  s   r   c                 C   s   t |  dd S Nz is not subscriptabler   r   r]   r]   r^   r	   l  s    r	   c                 C   s   t |  dd S r   r   r   r]   r]   r^   rP   z  s    rP   c                 C   s   t ||  d}t| |fS Nz accepts only single type.ri   ra   r   r   itemr]   r]   r^   r     s    r   c                 C   s   t ||  d}t| |fS r   r   r   r]   r]   r^   r     s    r   c                    s`   |dkrt dt|ts |f}d t fdd|D }t|}t|dkrV|d S t| |S )Nr]   z Cannot take a Union of no types.z)Union[arg, ...]: each arg must be a type.c                 3   s   | ]}t | V  qd S r   ri   rt   r   rf   r]   r^   r     ry   zUnion.<locals>.<genexpr>r   r   )rc   rZ   r}   r   r   r   r   r]   r   r^   r     s    
r   c                 C   s    t ||  d}t|td f S )Nz requires a single type.)ri   r   rY   )r   r   r\   r]   r]   r^   r     s    r   c                 G   sH   t |}z"tdd ttt|D }W n ty<   Y n0 t| |S )Nc                 s   s   | ]\}}|V  qd S r   r]   )rt   r   _r]   r]   r^   r     ry   zLiteral.<locals>.<genexpr>)r   r}   r   list_value_and_type_iterrc   r   r   r]   r]   r^   r     s    "r   c                   @   s@   e Zd ZdZdddddZdd	 Zd
d Zdd Zdd ZdS )r   )__forward_arg____forward_code____forward_evaluated____forward_value____forward_is_argument____forward_is_class____forward_module__TNF)rX   c                C   sx   t |tstd|zt|dd}W n  tyH   td|Y n0 || _|| _d| _d | _|| _	|| _
|| _d S )Nz*Forward reference must be a string -- got z<string>evalz/Forward reference must be an expression -- got F)rZ   r[   rc   compileSyntaxErrorr   r   r   r   r   r   r   )r   r\   rg   rW   rX   coder]   r]   r^   r     s    
zForwardRef.__init__c                 C   s   | j |v r| S | jr||ur|d u r6|d u r6i  }}n|d u rD|}n|d u rP|}| jd urrttj| jd d|}tt| j	||d| j
| jd}t||||| j hB | _d| _| jS )N__dict__z*Forward references must evaluate to types.)rg   rV   T)r   r   r   getattrsysmodulesgetri   r   r   r   r   r   r   )r   r   r   r   type_r]   r]   r^   r     s0    


zForwardRef._evaluatec                 C   sJ   t |tstS | jr2|jr2| j|jko0| j|jkS | j|jkoH| j|jkS r   )rZ   r   NotImplementedr   r   r   r   r   otherr]   r]   r^   __eq__5  s    


zForwardRef.__eq__c                 C   s   t | j| jfS r   )hashr   r   r   r]   r]   r^   __hash__>  s    zForwardRef.__hash__c                 C   s   d| j dS )NzForwardRef())r   r   r]   r]   r^   r   A  s    zForwardRef.__repr__)TN)	rp   rm   rn   r   r   r   r   r   r   r]   r]   r]   r^   r     s   	r   c                   @   s2   e Zd ZdZddddddZdd Zd	d
 ZdS )r   )rp   	__bound____constraints____covariant____contravariant__r   NF)bound	covariantcontravariantc             	      s   || _ |r|rtdt|| _t|| _|r>|d ur>td|rVt|dkrVtdd t fdd|D | _|rt	|d| _
nd | _
ztdjd	d
}W n ttfy   d }Y n0 |dkr|| _d S )Nz"Bivariant types are not supported.z-Constraints cannot be combined with bound=...r   z"A single constraint is not allowedz:TypeVar(name, constraint, ...): constraints must be types.c                 3   s   | ]}t | V  qd S r   r   rs   r   r]   r^   r     ry   z#TypeVar.__init__.<locals>.<genexpr>zBound must be a type.rp   __main__typing)rp   
ValueErrorboolr   r   rc   r   r}   r   ri   r   r   	_getframe	f_globalsr   AttributeErrorrm   )r   namer   r   r   constraintsdef_modr]   r   r^   r   t  s(    


zTypeVar.__init__c                 C   s&   | j rd}n| jrd}nd}|| j S )N+-~)r   r   rp   )r   prefixr]   r]   r^   r     s    zTypeVar.__repr__c                 C   s   | j S r   )rp   r   r]   r]   r^   r     s    zTypeVar.__reduce__)rp   rm   rn   r   r   r   r   r]   r]   r]   r^   r   E  s   ,	r   c                 C   s   |  do| dS )N__)
startswithendswith)attrr]   r]   r^   
_is_dunder  s    r  c                       sT   e Zd ZdddddZdd Zdd	 Zd
d Z fddZdd Zdd Z	  Z
S )_BaseGenericAliasTNinstr  c                C   s   || _ || _|| _d | _d S r   )_instr   rb   r   )r   originr  r  r]   r]   r^   r     s    z_BaseGenericAlias.__init__c                 O   sT   | j s"td| j d| jj d| j|i |}z
| |_W n tyN   Y n0 |S )NzType z cannot be instantiated; use z
() instead)r  rc   r   rb   rp   __orig_class__r  )r   r   kwargsresultr]   r]   r^   r     s    

z_BaseGenericAlias.__call__c                 C   sd   g }| j |vr|| j  || }||d d  D ]}t|tsLt|tr4 q\q4|t t|S )Nr   )rb   rz   indexrZ   r  
issubclassr   r}   )r   r   resibr]   r]   r^   r     s    


z!_BaseGenericAlias.__mro_entries__c                 C   s*   d| j v rt|st| j|S t|d S )Nrb   )r   r  r   rb   r  )r   r  r]   r]   r^   __getattr__  s    z_BaseGenericAlias.__getattr__c                    s2   t |s|dv r t || nt| j|| d S )N)r   r  _nparams)r  super__setattr__setattrrb   )r   r  val	__class__r]   r^   r    s    z_BaseGenericAlias.__setattr__c                 C   s   |  t|S r   )r   rY   r   r]   r]   r^   r     s    z#_BaseGenericAlias.__instancecheck__c                 C   s   t dd S )NzBSubscripted generics cannot be used with class and instance checksr   r   r]   r]   r^   r     s    z#_BaseGenericAlias.__subclasscheck__)rp   rm   rn   r   r   r   r  r  r   r   __classcell__r]   r]   r"  r^   r    s   	r  c                       sd   e Zd Zddd fdd
Zdd Zdd	 Zed
d Zdd Zdd Z	dd Z
 fddZ  ZS )ra   TNr  c                   sP   t  j|||d t|ts"|f}tdd |D | _t|| _|sL|j| _d S )Nr  c                 s   s*   | ]"}|t u rd n|tu rdn|V  qdS ).r]   N)_TypingEllipsis_TypingEmptyr   r]   r]   r^   r     s   z)_GenericAlias.__init__.<locals>.<genexpr>)r  r   rZ   r}   r   r~   r|   rm   )r   r  r   r  r  r"  r]   r^   r     s    


z_GenericAlias.__init__c                 C   s&   t |tstS | j|jko$| j|jkS r   )rZ   ra   r   rb   r   r   r]   r]   r^   r     s
    

z_GenericAlias.__eq__c                 C   s   t | j| jfS r   )r   rb   r   r   r]   r]   r^   r     s    z_GenericAlias.__hash__c                    s   | j ttfv rtd|  t|ts,|f}d t fdd|D }t| |t| j t	t
| j|g }| jD ]X}t|tr| }n6t|ttfr|j}|rtfdd|D }|| }|| qr| t|S )Nz%Cannot subscript already-subscripted *Parameters to generic types must be types.c                 3   s   | ]}t | V  qd S r   r   r   r   r]   r^   r     ry   z,_GenericAlias.__getitem__.<locals>.<genexpr>c                 3   s   | ]} | V  qd S r   r]   )rt   x)substr]   r^   r   
  ry   )rb   r   r   rc   rZ   r}   r   r   r|   dictzipr   r   ra   r   rz   r   )r   r   new_argsr\   	subparamssubargsr]   )rf   r)  r^   r     s&    



z_GenericAlias.__getitem__c                 C   s   | j | j|| j| jdS N)r  r  )r#  rb   r   r  r   r   r]   r]   r^   r     s    z_GenericAlias.copy_withc                 C   sB   | j rd| j  }n
t| j}ddd | jD }| d| dS )Nr   , c                 S   s   g | ]}t |qS r]   rr   r   r]   r]   r^   rx     ry   z*_GenericAlias.__repr__.<locals>.<listcomp>[])r   rr   rb   joinr   )r   r  r   r]   r]   r^   r     s
    
z_GenericAlias.__repr__c                 C   sR   | j rt | j  }n| j}t| j}t|dkrDt|d tsD|\}tj||ffS )Nr   r   )	r   globalsrb   r}   r   r   rZ   operatorr   )r   r  r   r]   r]   r^   r     s    
z_GenericAlias.__reduce__c                    sh   | j rt |S | jtu r`t|v r(dS || }||d d  D ]}t|trB|| urB dS qB| jfS )Nr]   r   )	r   r  r   rb   r   r   r  rZ   r  )r   r   r  r  r"  r]   r^   r   $  s    

z_GenericAlias.__mro_entries__)rp   rm   rn   r   r   r   r   r   r   r   r   r   r$  r]   r]   r"  r^   ra     s   

ra   c                       sT   e Zd Zddd fdd
Zedd Zdd	 Zd
d Z fddZdd Z	  Z
S )_SpecialGenericAliasTNr  c                   s^   |d u r|j }t j|||d || _|jdkrBd|j d| _nd|j d|j d| _d S )Nr  rj   zA generic version of r`   )rp   r  r   r  rm   rn   r   )r   r  nparamsr  r  r"  r]   r^   r   6  s    
z_SpecialGenericAlias.__init__c                    sB   t |ts|f}d t fdd|D }t| || j | |S )Nr'  c                 3   s   | ]}t | V  qd S r   r   r   r   r]   r^   r   E  ry   z3_SpecialGenericAlias.__getitem__.<locals>.<genexpr>)rZ   r}   r   r  r   r0  r]   r   r^   r   @  s    
z _SpecialGenericAlias.__getitem__c                 C   s   t | j|| j| jdS r/  )ra   rb   r   r  r0  r]   r]   r^   r   I  s    z_SpecialGenericAlias.copy_withc                 C   s
   d| j  S r   r   r   r]   r]   r^   r   M  s    z_SpecialGenericAlias.__repr__c                    s:   t |trt|j| jS t |ts.t|| jS t |S r   )rZ   r8  r  rb   ra   r  r   r   r"  r]   r^   r   P  s
    

z&_SpecialGenericAlias.__subclasscheck__c                 C   s   | j S r   r   r   r]   r]   r^   r   W  s    z_SpecialGenericAlias.__reduce__)rp   rm   rn   r   r   r   r   r   r   r   r$  r]   r]   r"  r^   r8  5  s   

r8  c                       s$   e Zd Z fddZdd Z  ZS )_CallableGenericAliasc                    s\   t | jdkr&| jd tu r&t  S dddd | jd d D  dt| jd  d	S )
N   r   ztyping.Callable[[r1  c                 S   s   g | ]}t |qS r]   r2  r   r]   r]   r^   rx   a  ry   z2_CallableGenericAlias.__repr__.<locals>.<listcomp>z], r4  )r   r   Ellipsisr  r   r5  rr   r   r"  r]   r^   r   \  s    
z_CallableGenericAlias.__repr__c                 C   sD   | j }t|dkr|d du s6t|d d |d f}tjt|ffS )Nr;  r   .r<  )r   r   r   r7  r   r
   r   r   r]   r]   r^   r   d  s    z _CallableGenericAlias.__reduce__)rp   rm   rn   r   r   r$  r]   r]   r"  r^   r:  [  s   r:  c                   @   s(   e Zd Zdd Zdd Zedd ZdS )_CallableTypec                 C   s   t | j|| j| jdS r/  )r:  rb   r   r  r0  r]   r]   r^   r   l  s    z_CallableType.copy_withc                 C   sP   t |trt|dkrtd|\}}t |tr>t||f}n||f}| |S )Nr;  z6Callable must be used as Callable[[arg, ...], result].)rZ   r}   r   rc   r   __getitem_inner__)r   r   r   r  r]   r]   r^   r   p  s    
z_CallableType.__getitem__c                 C   sb   |\}}d}t ||}|tu r,| t|fS t|ts<|f}tdd |D }||f }| |S )Nz.Callable[args, result]: result must be a type.c                 s   s   | ]}t |V  qd S r   )r_   )rt   r\   r]   r]   r^   r     ry   z2_CallableType.__getitem_inner__.<locals>.<genexpr>)ri   r=  r   r%  rZ   r}   )r   r   r   r  rf   r]   r]   r^   r@  ~  s    


z_CallableType.__getitem_inner__N)rp   rm   rn   r   r   r   r@  r]   r]   r]   r^   r?  k  s   r?  c                   @   s   e Zd Zedd ZdS )
_TupleTypec                    s   |dkr|  tfS t|ts$|f}t|dkr\|d du r\d t|d  }|  |tfS d t fdd	|D }|  |S )
Nr]   r;  r   .z Tuple[t, ...]: t must be a type.r   z*Tuple[t0, t1, ...]: each t must be a type.c                 3   s   | ]}t | V  qd S r   r   r   r   r]   r^   r     ry   z)_TupleType.__getitem__.<locals>.<genexpr>)r   r&  rZ   r}   r   ri   r%  )r   r   r   r]   r   r^   r     s    
z_TupleType.__getitem__N)rp   rm   rn   r   r   r]   r]   r]   r^   rA    s   rA  c                       s4   e Zd Zdd Zdd Zdd Z fddZ  ZS )	r   c                 C   s   t | S r   )r   r0  r]   r]   r^   r     s    z_UnionGenericAlias.copy_withc                 C   s"   t |tstS t| jt|jkS r   )rZ   r   r   r   r   r   r]   r]   r^   r     s    
z_UnionGenericAlias.__eq__c                 C   s   t t| jS r   )r   	frozensetr   r   r]   r]   r^   r     s    z_UnionGenericAlias.__hash__c                    sd   | j }t|dkrZ|d td u r6dt|d  dS |d td u rZdt|d  dS t  S )Nr;  r   ztyping.Optional[r   r4  )r   r   rY   rr   r  r   r>  r"  r]   r^   r     s    z_UnionGenericAlias.__repr__)rp   rm   rn   r   r   r   r   r$  r]   r]   r"  r^   r     s   r   c                 C   s   dd | D S )Nc                 s   s   | ]}|t |fV  qd S r   )rY   r   r]   r]   r^   r     ry   z'_value_and_type_iter.<locals>.<genexpr>r]   )r   r]   r]   r^   r     s    r   c                   @   s   e Zd Zdd Zdd ZdS )r   c                 C   s*   t |tstS tt| jtt|jkS r   )rZ   r   r   r   r   r   r   r]   r]   r^   r     s    
z_LiteralGenericAlias.__eq__c                 C   s   t tt| jS r   )r   rB  r   r   r   r]   r]   r^   r     s    z_LiteralGenericAlias.__hash__N)rp   rm   rn   r   r   r]   r]   r]   r^   r     s   r   c                       s0   e Zd ZdZdZedd Z fddZ  ZS )r   r]   Fc                    s   t |ts|f}|s.| tur.td| j dd t fdd|D }| ttfv rtdd |D sxtd| j dt	t
|t	|krtd| j d	nt| |t	| j t| |S )
NzParameter list to z[...] cannot be emptyr'  c                 3   s   | ]}t | V  qd S r   r   r   r   r]   r^   r     ry   z,Generic.__class_getitem__.<locals>.<genexpr>c                 s   s   | ]}t |tV  qd S r   )rZ   r   r   r]   r]   r^   r     ry   zParameters to z [...] must all be type variablesz[...] must all be unique)rZ   r}   r   rc   rn   r   r   allrp   r   r   r   r|   ra   )r   r   r]   r   r^   __class_getitem__  s&    
zGeneric.__class_getitem__c           
         s  t  j|i | g }d| jv r,t| jv }nt| jv o>| jdk}|rLtdd| jv rt| j}d }| jD ].}t	|t
rl|jtu rl|d urtd|j}ql|d urt|}t| | ksd fdd|D }ddd |D }	td	| d
|	 d|}t|| _d S )N__orig_bases__r   z!Cannot inherit from plain Genericz0Cannot inherit from Generic[...] multiple types.r1  c                 3   s   | ]}| vrt |V  qd S r   r[   rs   gvarsetr]   r^   r     ry   z,Generic.__init_subclass__.<locals>.<genexpr>c                 s   s   | ]}t |V  qd S r   rF  )rt   gr]   r]   r^   r     ry   zSome type variables (z) are not listed in Generic[r4  )r  r   r   r   rE  	__bases__rp   rc   r~   rZ   ra   rb   r|   r   r5  r}   )
r   r   r  rw   errorgvarsbasetvarsets_varss_argsr"  rG  r^   r     s<    







zGeneric.__init_subclass__)	rp   rm   rn   r   _is_protocolr   rD  r   r$  r]   r]   r"  r^   r     s
   
r   c                   @   s   e Zd ZdS )r&  Nrp   rm   rn   r]   r]   r]   r^   r&    s   r&  c                   @   s   e Zd ZdS )r%  NrR  r]   r]   r]   r^   r%    s   r%  )r|   rE  r  rQ  _is_runtime_protocol)__abstractmethods____annotations__r   r   r   rm   __new__r   __subclasshook__r   rD  _MutableMapping__markerc                 C   sr   t  }| jd d D ]X}|jdv r$qt|di }t|j t|  D ] }|dsJ|tvrJ|	| qJq|S )Nr<  )r   r   rU  _abc_)
r   __mro__rp   r   r   r   keysr  EXCLUDED_ATTRIBUTESadd)r   attrsrM  annotationsr  r]   r]   r^   _get_protocol_attrs)  s    
r`  c                    s   t  fddt D S )Nc                 3   s   | ]}t t |d V  qd S r   )re   r   rt   r  r   r]   r^   r   <  ry   z,_is_callable_members_only.<locals>.<genexpr>)rC  r`  rb  r]   rb  r^   _is_callable_members_only:  s    rc  c                 O   st   t | }|jrtd|jtur$d S |jD ]$}|jdt}|tur*||_ qXq*tj|_|j| g|R i | d S )Nz Protocols cannot be instantiatedr   )	rY   rQ  rc   r   _no_init_or_replace_initrZ  r   r   object)r   r   r  r   rM  initr]   r]   r^   rd  ?  s    

rd  c                	   C   s4   zt djd dv W S  ttfy.   Y dS 0 d S )N   rp   )abcr   T)r   r   r  r  r   r]   r]   r]   r^   _allow_reckless_class_cheks]  s    ri  )
r
   r'   r   r   r)   r   r%   r   r+   r.   AbstractContextManagerAbstractAsyncContextManager)zcollections.abc
contextlibc                       s   e Zd Z fddZ  ZS )_ProtocolMetac                    sV   t  ddrt r$tj r$dS  jrJt fddt D rJdS t S )NrQ  FTc                 3   s8   | ]0}t |o.tt |d  p.t|d uV  qd S r   )hasattrre   r   ra  r   instancer]   r^   r   }  s   
z2_ProtocolMeta.__instancecheck__.<locals>.<genexpr>)	r   rc  r  r#  rQ  rC  r`  r  r   ro  r"  ro  r^   r   u  s    
z_ProtocolMeta.__instancecheck__)rp   rm   rn   r   r$  r]   r]   r"  r^   rm  r  s   rm  c                       s(   e Zd ZdZdZdZ fddZ  ZS )r   r]   TFc                    s   t  j|i |  jdds6tdd  jD  _ fdd}d jvrR| _ js\d S  jD ]F}|tt	fv sb|j
tv r|jt|j
 v sbt|t	r|jsbtd| qbt _d S )	NrQ  Fc                 s   s   | ]}|t u V  qd S r   )r   )rt   r  r]   r]   r^   r     ry   z-Protocol.__init_subclass__.<locals>.<genexpr>c                    s    j ddstS t dds0t r(tS tdt sJt rBtS tdt| ts\tdt	 D ]v}| j
D ]b}||j v r|j | d u rt    S  qdt|di }t|tjjrn||v rnt| trn| jrn qdqnt  S qddS )	NrQ  FrS  zLInstance and class checks can only be used with @runtime_checkable protocolsz<Protocols with non-method members don't support issubclass()z"issubclass() arg 1 must be a classrU  T)r   r   r   r   ri  rc   rc  rZ   rY   r`  rZ  collectionsrh  r   r  r   rQ  )r   r  rM  r_  rb  r]   r^   _proto_hook  s:    



z/Protocol.__init_subclass__.<locals>._proto_hookrW  z7Protocols can only inherit from other protocols, got %r)r  r   r   r   anyrJ  rQ  rW  re  r   rm   _PROTO_WHITELISTrp   r  rc   rd  r   )r   r   r  rr  rM  r"  rb  r^   r     s,    &

zProtocol.__init_subclass__)rp   rm   rn   r   rQ  rS  r   r$  r]   r]   r"  r^   r     s   r   )	metaclassc                       sD   e Zd Z fddZdd Zdd Zdd Zd	d
 Zdd Z  Z	S )_AnnotatedAliasc                    s2   t |tr|j| }|j}t || || _d S r   )rZ   rv  __metadata__rb   r  r   )r   r  metadatar"  r]   r^   r     s
    

z_AnnotatedAlias.__init__c                 C   s   |d }t || jS )Nr   )rv  rw  )r   r   new_typer]   r]   r^   r     s    z_AnnotatedAlias.copy_withc                 C   s$   d t| jddd | jD S )Nztyping.Annotated[{}, {}]r1  c                 s   s   | ]}t |V  qd S r   )rl   r   r]   r]   r^   r     ry   z+_AnnotatedAlias.__repr__.<locals>.<genexpr>)formatrr   rb   r5  rw  r   r]   r]   r^   r     s    z_AnnotatedAlias.__repr__c                 C   s   t jt| jf| j ffS r   )r7  r   r   rb   rw  r   r]   r]   r^   r     s    z_AnnotatedAlias.__reduce__c                 C   s&   t |tstS | j|jko$| j|jkS r   )rZ   rv  r   rb   rw  r   r]   r]   r^   r     s
    

z_AnnotatedAlias.__eq__c                 C   s   t | j| jfS r   )r   rb   rw  r   r]   r]   r^   r     s    z_AnnotatedAlias.__hash__)
rp   rm   rn   r   r   r   r   r   r   r$  r]   r]   r"  r^   rv    s   rv  c                   @   s,   e Zd ZdZdd Zedd Zdd ZdS )	r   r]   c                 O   s   t dd S )Nz&Type Annotated cannot be instantiated.r   r   r   r  r]   r]   r^   rV  2  s    zAnnotated.__new__c                 C   sN   t |trt|dk rtdd}t|d |dd}t|dd  }t||S )Nr;  zUAnnotated[...] should be used with at least two arguments (a type and an annotation).z$Annotated[t, ...]: t must be a type.r   TrU   r   )rZ   r}   r   rc   ri   rv  )r   r   rf   r  rx  r]   r]   r^   rD  5  s    zAnnotated.__class_getitem__c                 O   s   t d| jd S )NzCannot subclass {}.Annotated)rc   rz  rm   r{  r]   r]   r^   r   @  s    
zAnnotated.__init_subclass__N)rp   rm   rn   r   rV  r   rD  r   r]   r]   r]   r^   r     s
   

r   c                 C   s&   t | tr| jstd|  d| _| S )NzB@runtime_checkable can be only applied to protocol classes, got %rT)r  r   rQ  rc   rS  rb  r]   r]   r^   rR   F  s    rR   c                 C   s   |S r   r]   )typr!  r]   r]   r^   rH   _  s    rH   c           
      C   s   z
| j }W n ty    i  Y S 0 |j}|j}|d | }| jpBd}| j}|rVt|ni }|t| }t||d  |D ]\}}	|	||< qx|S )Nr]   )	__code__r  co_argcountco_varnames__defaults____kwdefaults__r*  r   r+  )
r   r   	pos_count	arg_namesdefaults
kwdefaultsr  
pos_offsetr  valuer]   r]   r^   _get_defaultsj  s    



r  c                 C   s  t | dd ri S t| tri }t| jD ]|}|d u rDtj|j j}n|}|j	di }|
 D ]D\}}	|	d u rvtd }	t|	trt|	ddd}	t|	||}	|	||< q^q(|r|S dd |
 D S |d u rt| tjr| j}n"| }
t|
dr|
j}
qt |
d	i }|d u r|}n|d u r|}t | dd }|d u rRt| trDi S td
| t| }t|}|
 D ]t\}}	|	d u rtd }	t|	trt|	t| tj dd}	t|	||}	||v r|| d u rt|	 }	|	||< qj|r|S dd |
 D S )N__no_type_check__rU  FT)rg   rX   c                 S   s   i | ]\}}|t |qS r]   _strip_annotationsrt   kru   r]   r]   r^   
<dictcomp>  ry   z"get_type_hints.<locals>.<dictcomp>__wrapped____globals__z1{!r} is not a module, class, method, or function.c                 S   s   i | ]\}}|t |qS r]   r  r  r]   r]   r^   r    ry   )r   rZ   rY   reversedrZ  r   r   rm   r   r   itemsr[   r   r   rk   
ModuleTypern  r  _allowed_typesrc   rz  r  r*  r   )rq   r   r   include_extrashintsrM  base_globalsannr  r  nsobjr  r]   r]   r^   rL     sf     







rL   c                 C   s   t | trt| jS t | trJtdd | jD }|| jkr@| S | |S t | trtdd | jD }|| jkrv| S t| j|S | S )Nc                 s   s   | ]}t |V  qd S r   r  r   r]   r]   r^   r     ry   z%_strip_annotations.<locals>.<genexpr>c                 s   s   | ]}t |V  qd S r   r  r   r]   r]   r^   r     ry   )	rZ   rv  r  rb   ra   r}   r   r   r   )ru   stripped_argsr]   r]   r^   r    s    






r  c                 C   s2   t | trtS t | ttfr"| jS | tu r.tS d S r   )rZ   rv  r   r  r   rb   r   )tpr]   r]   r^   rK     s    
rK   c                 C   sf   t | tr| jf| j S t | ttfrb| j}| jtjj	u r^|d t
ur^t|d d |d f}|S dS )Nr   r<  r]   )rZ   rv  rb   rw  ra   r   r   rq  rh  r
   r=  r   )r  r  r]   r]   r^   rJ   	  s    
rJ   c                 C   s   t | trt| j }| j D ]"\}}|| j| f v r|| q| D ](}t |tj	r`d|_
t |trJt| qJz
d| _
W n ty   Y n0 | S )NT)rZ   rY   r   copyr  rJ  popvaluesrk   ro   r  rN   rc   )r\   	arg_attrsr  r!  rq   r]   r]   r^   rN     s    	




rN   c                    s   t   fdd}|S )Nc                     s    | i |}t |}|S r   )rN   )r   r   r   r   r]   r^   wrapped_decorator?  s    z2no_type_check_decorator.<locals>.wrapped_decorator)r   r   )r   r  r]   r  r^   rO   8  s    rO   c                  O   s   t dd S )NzYou should not call an overloaded function. A series of @overload-decorated functions outside a stub module should always be followed by an implementation that is not @overload-ed.)NotImplementedErrorr   r]   r]   r^   _overload_dummyH  s    r  c                 C   s   t S r   )r  )r   r]   r]   r^   rQ   Q  s    rQ   c                 C   s   | S r   r]   )fr]   r]   r^   rI   n  s    rI   TKTVTT_co)r   V_coVT_coT_contra)r   CT_co)r   r   rG   r   rg  r;  a  Callable type; Callable[[int], str] is a function of (int) -> str.

    The subscription syntax must always be used with exactly two
    values: the argument list and the return type.  The argument list
    must be a list of types or ellipsis; the return type must be a single type.

    There is no syntax to indicate optional or keyword arguments,
    such function types are rarely used as callback types.
    r   )r  r<  r   r  a@  Tuple type; Tuple[X, Y] is the cross-product type of X and Y.

    Example: Tuple[T1, T2] is a tuple of two elements corresponding
    to type variables T1 and T2.  Tuple[int, float, str] is a tuple
    of an int, a float and a string.

    To specify a variable-length tuple of homogeneous type, use Tuple[T, ...].
    r;   r8   r=   r>   r   r-   r9   r:   r   a  A special construct usable to annotate class objects.

    For example, suppose we have the following classes::

      class User: ...  # Abstract base for User classes
      class BasicUser(User): ...
      class ProUser(User): ...
      class TeamUser(User): ...

    And a function that takes a class argument that's a subclass of
    User and returns an instance of the corresponding class::

      U = TypeVar('U', bound=User)
      def new_user(user_class: Type[U]) -> U:
          user = user_class()
          # (Here we could write the user object to a database)
          return user

      joe = new_user(BasicUser)

    At this point the type checker knows that joe has type BasicUser.
    c                   @   s"   e Zd ZdZeedddZdS )r4   r]   returnc                 C   s   d S r   r]   r   r]   r]   r^   __int__  s    zSupportsInt.__int__N)rp   rm   rn   r   r   intr  r]   r]   r]   r^   r4     s   r4   c                   @   s"   e Zd ZdZeedddZdS )r2   r]   r  c                 C   s   d S r   r]   r   r]   r]   r^   	__float__  s    zSupportsFloat.__float__N)rp   rm   rn   r   r   floatr  r]   r]   r]   r^   r2     s   r2   c                   @   s"   e Zd ZdZeedddZdS )r1   r]   r  c                 C   s   d S r   r]   r   r]   r]   r^   __complex__	  s    zSupportsComplex.__complex__N)rp   rm   rn   r   r   complexr  r]   r]   r]   r^   r1     s   r1   c                   @   s"   e Zd ZdZeedddZdS )r0   r]   r  c                 C   s   d S r   r]   r   r]   r]   r^   	__bytes__  s    zSupportsBytes.__bytes__N)rp   rm   rn   r   r   bytesr  r]   r]   r]   r^   r0     s   r0   c                   @   s"   e Zd ZdZeedddZdS )r3   r]   r  c                 C   s   d S r   r]   r   r]   r]   r^   	__index__  s    zSupportsIndex.__index__N)rp   rm   rn   r   r   r  r  r]   r]   r]   r^   r3     s   r3   c                   @   s"   e Zd ZdZeedddZdS )r/   r]   r  c                 C   s   d S r   r]   r   r]   r]   r^   __abs__'  s    zSupportsAbs.__abs__N)rp   rm   rn   r   r   r  r  r]   r]   r]   r^   r/   "  s   r/   c                   @   s&   e Zd ZdZedeedddZdS )r5   r]   r   )ndigitsr  c                 C   s   d S r   r]   )r   r  r]   r]   r^   	__round__1  s    zSupportsRound.__round__N)r   )rp   rm   rn   r   r   r  r  r  r]   r]   r]   r^   r5   ,  s   r5   r]   c                 C   s@   dd |D }dd |D }t j| |||d}| |_|j_|S )Nc                 S   s   g | ]\}}|qS r]   r]   rt   nru   r]   r]   r^   rx   7  ry   z!_make_nmtuple.<locals>.<listcomp>c                 S   s$   i | ]\}}|t |d | dqS )zfield z annotation must be a typer   r  r]   r]   r^   r  8  s   z!_make_nmtuple.<locals>.<dictcomp>r  rW   )rq  
namedtuplerU  rV  )r  rk   rW   r  fieldsnm_tplr]   r]   r^   _make_nmtuple6  s    r  >
   r   _asdict_source_replace_field_defaults_maker   __getnewargs__rV  _fields>   rp   rm   rU  c                   @   s   e Zd Zdd ZdS )NamedTupleMetac           	   
      s     di }g }|D ]L}| v r,|| q|rtd| dt|dkrJdnd dd| qt||  fd	d
|D  d d} D ]<}|tv rtd| q|t	vr||j
vrt|| |  q|S )NrU  zNon-default namedtuple field z cannot follow default fieldr   s  r1  c                    s   g | ]} | qS r]   r]   )rt   r  nsr]   r^   rx   W  ry   z*NamedTupleMeta.__new__.<locals>.<listcomp>rm   r  z&Cannot overwrite NamedTuple attribute )r   rz   rc   r   r5  r  r  _prohibitedr  _specialr  r   )	r   typenamer   r  rk   default_names
field_namer  keyr]   r  r^   rV  J  s*    


zNamedTupleMeta.__new__N)rp   rm   rn   rV  r]   r]   r]   r^   r  H  s   r  c             	   K   s`   |d u r|  }n|rtdztdjdd}W n ttfyP   d }Y n0 t| ||dS )NzIEither list of fields or keywords can be provided to NamedTuple, not bothr   rp   r   rW   )	r  rc   r   r   r  r   r  r   r  )r  r  r  rW   r]   r]   r^   r?   b  s    

r?   c                 C   s   t | dkrtdtfS )Nr   z5Multiple inheritance with NamedTuple is not supported)r   rc   _NamedTupler   r]   r]   r^   _namedtuple_mro_entries  s    r  c                   @   s&   e Zd ZdddZeZdd ZeZdS )_TypedDictMetaTc                    s  |D ]}t |turtdqt t|tf|i }|di }t| }d  fdd| D }t }	t }
|D ]@}|	|j
di  |		|j
dd |
	|j
dd qx|	| |r|		| n
|
	| |_t|	_t|
_td	s
|_S )
NzHcannot inherit from both a TypedDict type and a non-TypedDict base classrU  z?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typec                    s"   i | ]\}}|t | jd qS )r  )ri   rm   )rt   r  r  rf   tp_dictr]   r^   r    s   z*_TypedDictMeta.__new__.<locals>.<dictcomp>__required_keys__r]   __optional_keys__	__total__)rY   r  rc   rV  r*  r   r   r[  r  updater   rU  rB  r  r  rn  r  )r   r  r   r  totalrM  r_  own_annotationsown_annotation_keysrequired_keysoptional_keysr]   r  r^   rV    s6    




z_TypedDictMeta.__new__c                 C   s   t dd S )Nz4TypedDict does not support instance and class checksr   )r   r   r]   r]   r^   r     s    z _TypedDictMeta.__subclasscheck__N)T)rp   rm   rn   rV  r*  r   r   r   r]   r]   r]   r^   r    s   
+r  r  c            	   K   sj   |d u r|}n|rt ddt|i}ztdjdd|d< W n ttfyX   Y n0 t| d||dS )	Nz@TypedDict takes either a dict or keyword arguments, but not bothrU  r   rp   r   rm   r]   r  )	rc   r*  r   r   r  r   r  r   r  )r  r  r  r  r  r]   r]   r^   r@     s    *r@   c                 C   s   t fS r   )
_TypedDictr  r]   r]   r^   <lambda>  ry   r  c                 C   s   dd }| |_ ||_|S )Nc                 S   s   | S r   r]   )r(  r]   r]   r^   ry    s    zNewType.<locals>.new_type)rp   __supertype__)r  r  ry  r]   r]   r^   rM     s    rM   c                   @   s  e Zd ZdZeeedddZeeedddZedddd	Z	eee
dd
dZeedddZeddddZee
dddZed6eedddZee
dddZed7eedddZed8eee dddZed9eeedd d!Zee
dd"d#Zeedd$d%Zed:eed&d'd(Zee
dd)d*Zeeed+d,d-Zeee dd.d/d0Zed1dd2d3Zeddd4d5ZdS );rC   r]   r  c                 C   s   d S r   r]   r   r]   r]   r^   mode4  s    zIO.modec                 C   s   d S r   r]   r   r]   r]   r^   r  9  s    zIO.nameNc                 C   s   d S r   r]   r   r]   r]   r^   close>  s    zIO.closec                 C   s   d S r   r]   r   r]   r]   r^   closedB  s    z	IO.closedc                 C   s   d S r   r]   r   r]   r]   r^   filenoG  s    z	IO.filenoc                 C   s   d S r   r]   r   r]   r]   r^   flushK  s    zIO.flushc                 C   s   d S r   r]   r   r]   r]   r^   isattyO  s    z	IO.isattyr<  )r  r  c                 C   s   d S r   r]   )r   r  r]   r]   r^   readS  s    zIO.readc                 C   s   d S r   r]   r   r]   r]   r^   readableW  s    zIO.readable)limitr  c                 C   s   d S r   r]   )r   r  r]   r]   r^   readline[  s    zIO.readline)hintr  c                 C   s   d S r   r]   )r   r  r]   r]   r^   	readlines_  s    zIO.readlinesr   )offsetwhencer  c                 C   s   d S r   r]   )r   r  r  r]   r]   r^   seekc  s    zIO.seekc                 C   s   d S r   r]   r   r]   r]   r^   seekableg  s    zIO.seekablec                 C   s   d S r   r]   r   r]   r]   r^   tellk  s    zIO.tell)sizer  c                 C   s   d S r   r]   )r   r  r]   r]   r^   truncateo  s    zIO.truncatec                 C   s   d S r   r]   r   r]   r]   r^   writables  s    zIO.writabler  r  c                 C   s   d S r   r]   r   r  r]   r]   r^   writew  s    zIO.write)linesr  c                 C   s   d S r   r]   )r   r   r]   r]   r^   
writelines{  s    zIO.writelinesz
IO[AnyStr]c                 C   s   d S r   r]   r   r]   r]   r^   	__enter__  s    zIO.__enter__c                 C   s   d S r   r]   )r   rY   r  	tracebackr]   r]   r^   __exit__  s    zIO.__exit__)r<  )r<  )r<  )r   )N)rp   rm   rn   r   propertyr   r[   r  r  r  r   r  r  r  r  r  rG   r  r  r  r;   r  r  r  r  r  r  r  r  r  r  r]   r]   r]   r^   rC   %  sX   rC   c                   @   s>   e Zd ZdZeeeef edddZ	ed dddZ
dS )	rB   r]   r  c                 C   s   d S r   r]   r  r]   r]   r^   r    s    zBinaryIO.writer  c                 C   s   d S r   r]   r   r]   r]   r^   r    s    zBinaryIO.__enter__N)rp   rm   rn   r   r   r   r  	bytearrayr  r  r  r]   r]   r]   r^   rB     s
   rB   c                   @   s   e Zd ZdZeeedddZeeedddZ	eee
e dddZeeedd	d
ZeeedddZed dddZdS )rF   r]   r  c                 C   s   d S r   r]   r   r]   r]   r^   buffer  s    zTextIO.bufferc                 C   s   d S r   r]   r   r]   r]   r^   encoding  s    zTextIO.encodingc                 C   s   d S r   r]   r   r]   r]   r^   errors  s    zTextIO.errorsc                 C   s   d S r   r]   r   r]   r]   r^   line_buffering  s    zTextIO.line_bufferingc                 C   s   d S r   r]   r   r]   r]   r^   newlines  s    zTextIO.newlinesc                 C   s   d S r   r]   r   r]   r]   r^   r    s    zTextIO.__enter__N)rp   rm   rn   r   r  r   rB   r  r[   r  r   r	  r   r
  r	   r  r  r]   r]   r]   r^   rF     s$   rF   c                   @   s    e Zd Zg dZeZeZeZdS )io)rC   rF   rB   N)rp   rm   rn   __all__rC   rF   rB   r]   r]   r]   r^   r    s   r  z.ioc                   @   s   e Zd ZddgZeZeZdS )rerE   rD   N)rp   rm   rn   r  rE   rD   r]   r]   r]   r^   r    s   r  z.re)N)TN)N)NNF)r]   )N)N)rh  r   r   rq  collections.abcrl  r   r7  r  	stdlib_rer   rk   r   r   r   r   r  r_   ri   rr   r~   r   r   r   r   r   r   rB  r   r   r   rd   r   r	   rP   r   r   r   r   r   r   r   r  r  ra   r8  r:  r?  rA  r   r   r   r   r&  r%  _TYPING_INTERNALS_SPECIAL_NAMESr\  r`  rc  rd  ri  rt  rm  r   rv  r   rR   rH   r  ro   BuiltinFunctionType
MethodTyper  r  rL   r  rK   rJ   rN   rO   r  rQ   rI   r  r  r  r  r  r  r  rY   r  r  r[   rG   _aliasr   r'   r*   r)   r(   r   r   r.   r%   r   r+   r
   r   r=   r   r#   r   r!   r$   r"   r   r}   r   r   r;   dequer8   r   r>   r    r   r   r&   rj  r   rk  r-   r*  r9   defaultdictr:   r<   r7   r6   rA   r,   r   r4   r2   r1   r0   r3   r/   r5   r  r  r  r  r?   rV  r  r  r   r  r@   r  rM   rS   rT   rC   rB   rF   r  rp   r   rE   rD   r]   r]   r]   r^   <module>   sf  `	!	




%
!ATFS&!Q	b)5
]	
								

#59
c#	

