Your IP : 3.148.115.43


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/typing.cpython-310.opt-2.pyc

o

6��f�i�@s�	ddlmZmZddlZddlZddlZddlZddlZddlZ	ddl
Z
ddlZddlmZm
Z
mZmZgd�Zd�dd�dd�Zd�dd�d
d�Zdd
�Zdd�Zd�dd�Zdd�Zdd�Zdd�Zdd�Zdd�ZgZd�dd�dd�Ze�fdd �ZGd!d"�d"�ZGd#d$�d$�Z Gd%d&�d&ed	d'�Z!Gd(d)�d)e!d	d'�Z"e!d*d+��Z#e!d,d-��Z$e!d.d/��Z%e!d0d1��Z&e!d2d3��Z'e!d4d5��Z(e"ed	d�d6d7���Z)e!d8d9��Z*e!d:d;��Z+e!d<d=��Z,Gd>d?�d?ed	d'�Z-Gd@dA�dA�Z.GdBdC�dCee e.d	d'�Z/GdDdE�dEee d	d'�Z0GdFdG�dGee d	d'�Z1GdHdI�dIee e.d	d'�Z2dJdK�Z3GdLdM�dMed	d'�Z4GdNdO�dOe4d	d'�Z5GdPdQ�dQe4d	d'�Z6GdRdS�dSe5d	d'�Z7GdTdU�dUe6d	d'�Z8GdVdW�dWe6d	d'�Z9GdXdY�dYe5d	d'�Z:dZd[�Z;Gd\d]�d]e5d	d'�Z<Gd^d_�d_e5d	d'�Z=Gd`da�da�Z>Gdbdc�dc�Z?Gddde�de�Z@gdf�ZAgdg�ZBeAeBdhgZCdidj�ZDdkdl�ZEdmdn�ZFd�dqdr�ZGd�dtdu�ZHgdv�dwdxgdy�ZIGdzd{�d{e�ZJGd|d}�d}e>eJd~�ZKGdd��d�e5d	d'�ZLGd�d��d��ZMd�d��ZNd�d��ZOd�d��ZPejQejRejSejTee
efZUd�d�d��ZVd�d��ZWd�d��ZXd�d��ZYd�d��ZZd�d��Z[d�d��Z\d�d��Z]d�d��Z^d�d��Z_e/d��Z`e/d��Zae/d��Zbe/d�d	d��Zce/d�d	d��Zde/d�d	d��Zee/d�d	d��Zfe/d�d	egd��Zhe/d�eiej�Zke6Zlelejjmd�Zmelejjndo�Znelejjods�Zoelejjpdo�Zpelejjqdo�Zqelejjrdo�Zrelejjsdo�Zselejjtdo�Ztelejjud�Zuelejjvdo�Zvelejjwdo�Zwe8ejjxd��Zxd�ex_yelejjzdod�d��Z{elejj|do�Z|elejj}d��Z}elejj~d��Z~elejjdo�Zelejj�do�Z�elejj�d�Z�e9e�d�dd�d��Z�d�e�_yele�dodd�d��Z�elej�dod�d��Z�ele�dodd�d��Zzeledodd�d��Z�elejj�do�Z�elejj�do�Z�elejj�d��Z�elejj�do�Z�elej�dod�d��Z�elej�dod�d��Z�ele�d�dd�d��Z�elej�d�d�d��Z�elej�d��Z�elej�do�Z�elej�d��Z�elejj�ds�Z�elejj�d��Z�elegdodd�d��Z�d�e�_yeNGd�d��d�eK��Z�eNGd�d��d�eK��Z�eNGd�d��d�eK��Z�eNGd�d„d�eK��Z�eNGd�dĄd�eK��Z�eNGd�dƄd�eKec��Z�eNGd�dȄd�eKec��Z�d�d�d˄Z�ehḍ�Z�ehdͣ�Z�Gd�dτd�eg�Z�d�d�dфZ�eg��e�d�d�i�Z�d�dӄZ�e�e�_�Gd�dՄd�eg�Z�d�d	d֜d�d؄Z�eg��e�d�d�i�Z�d�dڄe�_�Gd�d܄d܃Z�ejZ�dZ�Gd�dބd�e>ek�Z�Gd�d�d�e�ei�Z�Gd�d�d�e�ej�Z�Gd�d�d�Z�e�d�e�_�e�e
j�e�j�<ele	j�do�Z�ele	j�do�Z�Gd�d�d�Ze�d�e_�ee
j�ej�<dS)��)�abstractmethod�ABCMetaN)�WrapperDescriptorType�MethodWrapperType�MethodDescriptorType�GenericAlias)T�	Annotated�Any�Callable�ClassVar�Concatenate�Final�
ForwardRef�Generic�Literal�Optional�	ParamSpec�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�is_typeddict�NewType�
no_type_check�no_type_check_decorator�NoReturn�overload�
ParamSpecArgs�ParamSpecKwargs�runtime_checkable�Text�
TYPE_CHECKING�	TypeAlias�	TypeGuardF��allow_special_formscCs.	|dur	td�St|t�rt|||d�S|S)N)�module�is_class)�type�
isinstance�strr)�argr^r]�rd�-/opt/alt/python310/lib64/python3.10/typing.py�
_type_convert�s
rfTc	Cs�	ttf}|s|tf7}|r|tf7}t|||d�}t|t�r+|j|vr+t|�d���|t	t
ttfvr5|St|t�s@|ttfvrHtd|�d���t|t
tttjtttf�rW|St|�sft|�d|d�d���|S)N)r^r]z is not valid as type argumentzPlain z Got z.100�.)rrrr
rfra�
_GenericAlias�
__origin__�	TypeErrorr	rSrZ�_SpecialFormr`rr�types�	UnionTyperrUrV�callable)rc�msg�is_argumentr^r]Zinvalid_generic_formsrdrdre�_type_check�s*



�rqcCs|dupt|ttttf�S)N.)ra�tuple�listr�_ConcatenateGenericAlias)rcrdrdre�_is_param_expr�s
�rucCsh	t|tj�rt|�St|t�r!|jdkr|jS|j�d|j��S|dur'dSt|tj�r0|jSt|�S)N�builtinsrg.z...)	rarlr�reprr`�
__module__�__qualname__�FunctionType�__name__)�objrdrdre�
_type_repr�s

r}csl	|durt}g�|D]&}t||�r|�vr��|�t|tttjf�r1���fdd�|jD��qt	��S)Ncsg|]}|�vr|�qSrdrd��.0�t��tvarsrdre�
<listcomp>��z&_collect_type_vars.<locals>.<listcomp>)
rra�appendrhrrlrm�extend�__parameters__rr)Ztypes_�
typevar_typesr�rdr�re�_collect_type_vars�s
�r�c	CsT	|s
t|�d���t|�}||kr(td||krdnd�d|�d|�d|����dS)Nz is not a generic classzToo �many�fewz arguments for z	; actual z, expected )rj�len)�cls�
parametersZelenZalenrdrdre�_check_generic�s���r�cCs�	t|j�dkr|rt|d�s|fSt||t|j��g}t||j�D]\}}t|t�r6t|t�r6t|�}|�	|�q$t|�S�N�r)
r�r�rur��ziprarrsrrr�)r��paramsZ_params�pZtvarrdrdre�_prepare_paramspec_params�s�
�r�cCsJt|�}t|�t|�kr#g}|D]}||vr |�|�|�|�q|}|S�N)�setr�r��remove)r�Z
all_paramsZ
new_paramsr�rdrdre�_deduplicate�s

�r�cCsz	g}|D]1}t|ttjf�r|�|j�qt|t�r1t|�dkr1|dtur1|�|dd��q|�	|�qtt
|��S)Nrr�)ra�_UnionGenericAliasrlrmr��__args__rrr�rr�r��r�r�r�rdrdre�_remove_dups_flattens"r�cCs:	g}|D]}t|t�r|�|j�q|�|�qt|�Sr�)ra�_LiteralGenericAliasr�r�r�rrr�rdrdre�_flatten_literal_paramss
r���typedcs"	�fdd�}|dur||�S|S)Ncs8tj�d����t��j�t�����fdd��}|S)Nr�cs2z�|i|��WStyYnw�|i|��Sr��rj��args�kwds��cached�funcrdre�inner2s�z+_tp_cache.<locals>.decorator.<locals>.inner)�	functools�	lru_cache�	_cleanupsr��cache_clear�wraps)r�r�r�r�re�	decorator.s
z_tp_cache.<locals>.decoratorrd)r�r�r�rdr�re�	_tp_cache*s

r�cs�	t|t�r
|�����St|tttjf�rHt���fdd�|jD��}||jkr+|St|t�r6t|j	|�St|tj�rCt
�tj
|�S|�|�S|S)Nc3s�|]
}t|����VqdSr�)�
_eval_type�r�a��globalns�localns�recursive_guardrdre�	<genexpr>I��z_eval_type.<locals>.<genexpr>)rar�	_evaluaterhrrlrmrrr�rir��reduce�operator�or_�	copy_with)r�r�r�r�Zev_argsrdr�rer�@s



r�c@seZdZ	dZdd�ZdS)�_Final)�__weakref__cOsd|vrtd��dS)N�_rootz&Cannot subclass special typing classesr���selfr�r�rdrdre�__init_subclass__Zs�z_Final.__init_subclass__N)r{rxry�	__slots__r�rdrdrdrer�Usr�c@s"eZdZ	dZdd�Zdd�ZdS)�
_ImmutablerdcC�|Sr�rd�r�rdrdre�__copy__b�z_Immutable.__copy__cCr�r�rd)r�Zmemordrdre�__deepcopy__er�z_Immutable.__deepcopy__N)r{rxryr�r�r�rdrdrdrer�^s
r�c@sleZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
edd��ZdS)rk)�_name�__doc__�_getitemcCs||_|j|_|j|_dSr�)r�r{r�r�)r��getitemrdrdre�__init__nsz_SpecialForm.__init__cCs|dvr|jSt|��)N>r{ry)r��AttributeError)r��itemrdrdre�__getattr__ssz_SpecialForm.__getattr__cC�td|����)N�Cannot subclass r�)r��basesrdrdre�__mro_entries__y�z_SpecialForm.__mro_entries__cC�
d|jS�N�typing.�r�r�rdrdre�__repr__|�
z_SpecialForm.__repr__cC�|jSr�r�r�rdrdre�
__reduce__�z_SpecialForm.__reduce__cOr�)NzCannot instantiate r�r�rdrdre�__call__�r�z_SpecialForm.__call__cC�t||fSr��r�r��otherrdrdre�__or__��z_SpecialForm.__or__cC�t||fSr�r�r�rdrdre�__ror__�r�z_SpecialForm.__ror__cC�t|�d���)Nz! cannot be used with isinstance()r��r�r|rdrdre�__instancecheck__�r�z_SpecialForm.__instancecheck__cCr�)Nz! cannot be used with issubclass()r��r�r�rdrdre�__subclasscheck__�r�z_SpecialForm.__subclasscheck__cCs|�||�Sr�)r��r�r�rdrdre�__getitem__�sz_SpecialForm.__getitem__N)r{rxryr�r�r�r�r�r�r�r�r�r�r�r�r�rdrdrdrerkksrk)r�c@�eZdZdd�ZdS)�_LiteralSpecialFormcCs"t|t�s|f}|j|g|�R�Sr�)rarrr�r�rdrdrer��s
z_LiteralSpecialForm.__getitem__N)r{rxryr�rdrdrdrer��sr�cC�	t|�d����Nz is not subscriptabler�r�rdrdrer	��
r	cCr�r�r�r�rdrdrerS�srScC�	t||�d��}t||f�S�Nz accepts only single type.�rqrh�r�r�r�rdrdrer�srcCr�r�r�r�rdrdrer
�sr
cs�	|dkr	td��t|t�s|f}d�t�fdd�|D��}t|�}t|�dkr,|dSt|�dkr?td�|vr?t||d	d
�St||�S)Nrdz Cannot take a Union of no types.z)Union[arg, ...]: each arg must be a type.c3��|]}t|��VqdSr��rq�rr��rordrer���zUnion.<locals>.<genexpr>r�r�r��name)rjrarrr�r�r`r�r�rdr�rer�s

rcCs"	t||�d��}t|td�fS)Nz requires a single type.)rqrr`)r�r�rcrdrdrersrcGsJ	t|�}ztdd�ttt|���D��}Wn	tyYnwt||�S)Ncss�|]\}}|VqdSr�rd)rr��_rdrdrer�0��zLiteral.<locals>.<genexpr>)r�rrr�rs�_value_and_type_iterrjr�r�rdrdrers"�
rcCr�r�r�r�rdrdrerZ7r�rZcsx	|dkr	td��t|t�s|f}t|dt�std��d�g�fdd�|dd�D��|d�R}t||ttfdd	�S)
Nrdz&Cannot take a Concatenate of no types.����AThe last parameter to Concatenate should be a ParamSpec variable.z/Concatenate[arg, ...]: each arg must be a type.c3r�r�r�r�r�rdrer�Zr�zConcatenate.<locals>.<genexpr>T��_typevar_types�_paramspec_tvars)rjrarrrrtrr�rdr�rerFs

(�rcCr�r�r�r�rdrdrer[`s*r[c@sBeZdZ	dZddd�dd�Zdd	�Zd
d�Zdd
�Zdd�ZdS)r)�__forward_arg__�__forward_code__�__forward_evaluated__�__forward_value__�__forward_is_argument__�__forward_is_class__�__forward_module__TNF)r_cCstt|t�std|����zt|dd�}Wnty"td|����w||_||_d|_d|_||_	||_
||_dS)Nz*Forward reference must be a string -- got z<string>�evalz/Forward reference must be an expression -- got F)rarbrj�compile�SyntaxErrorrrr
rrrr)r�rcrpr^r_�coderdrdrer��s
�
zForwardRef.__init__cCs�|j|vr|S|jr||urW|dur|duri}}n
|dur"|}n|dur(|}|jdur9ttj�|jd�d|�}tt|j	||�d|j
|jd�}t|||||jhB�|_
d|_|j
S)N�__dict__z*Forward references must evaluate to types.)rpr]T)rr
r�getattr�sys�modules�getrqrrrrr�r)r�r�r�r�Ztype_rdrdrer��s0


���zForwardRef._evaluatecCsJt|t�stS|jr|jr|j|jko|j|jkS|j|jko$|j|jkSr�)rar�NotImplementedr
rrrr�rdrdre�__eq__�s

�
�zForwardRef.__eq__cC�t|j|jf�Sr�)�hashrrr�rdrdre�__hash__��zForwardRef.__hash__cCsd|j�d�S)NzForwardRef(�))rr�rdrdrer��r�zForwardRef.__repr__�TN)	r{rxryr�r�r�rrr�rdrdrdrer�s	rc@s6eZdZ	dd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�_TypeVarLikecCsD	|r	|r	td��t|�|_t|�|_|rt|d�|_dSd|_dS)Nz"Bivariant types are not supported.zBound must be a type.)�
ValueError�bool�
__covariant__�__contravariant__rq�	__bound__)r��bound�	covariant�
contravariantrdrdrer��s


z_TypeVarLike.__init__cCr�r�r��r��rightrdrdrer��r�z_TypeVarLike.__or__cCr�r�r��r��leftrdrdrer��r�z_TypeVarLike.__ror__cCs&|jrd}n|jrd}nd}||jS)N�+�-�~)r&r'r{)r��prefixrdrdrer��s
z_TypeVarLike.__repr__cCr�r�)r{r�rdrdrer��r�z_TypeVarLike.__reduce__N)r{rxryr�r�r�r�r�rdrdrdrer#�s
	r#cs,eZdZ	dZdddd��fdd�
Z�ZS)r)r{r(�__constraints__r&r'rNF�r)r*r+c	s�||_t��|||�|r|durtd��|r!t|�dkr!td��d�t�fdd�|D��|_zt�d�j	�
dd�}Wn
ttfyHd}Ynw|d	krR||_
dSdS)
Nz-Constraints cannot be combined with bound=...r�z"A single constraint is not allowedz:TypeVar(name, constraint, ...): constraints must be types.c3r�r�r�r~r�rdrer�*r�z#TypeVar.__init__.<locals>.<genexpr>r{�__main__�typing)r{�superr�rjr�rrr4r�	_getframe�	f_globalsrr�r$rx)r�rr)r*r+Zconstraints�def_mod��	__class__r�rer�!s �
�zTypeVar.__init__)r{rxryr�r��
__classcell__rdrdr<rer�s+�rc@�&eZdZ	dd�Zdd�Zdd�ZdS)rUcC�
||_dSr��ri�r��originrdrdrer�?r�zParamSpecArgs.__init__cC�|jj�d�S)Nz.args�rir{r�rdrdrer�Br�zParamSpecArgs.__repr__cC�t|t�stS|j|jkSr�)rarUrrir�rdrdrerE�
zParamSpecArgs.__eq__N�r{rxryr�r�rrdrdrdrerU3�
rUc@r?)rVcCr@r�rArBrdrdrer�Wr�zParamSpecKwargs.__init__cCrD)Nz.kwargsrEr�rdrdrer�Zr�zParamSpecKwargs.__repr__cCrFr�)rarVrrir�rdrdrer]rGzParamSpecKwargs.__eq__NrHrdrdrdrerVKrIrVcsDeZdZ	dZedd��Zedd��Zdddd��fd	d
�
Z�ZS)r)r{r(r&r'rcC�t|�Sr�)rUr�rdrdrer���zParamSpec.argscCrJr�)rVr�rdrdre�kwargs�rKzParamSpec.kwargsNFr5c	s`||_t��|||�zt�d�j�dd�}Wn
ttfy$d}Ynw|dkr.||_	dSdS)Nr�r{r6r7)
r{r8r�rr9r:rr�r$rx)r�rr)r*r+r;r<rdrer��s�
�zParamSpec.__init__)	r{rxryr��propertyr�rLr�r>rdrdr<rercs-

rcCs|�d�o	|�d�S)N�__)�
startswith�endswith)�attrrdrdre�
_is_dunder�srRcsbeZdZ	ddd�dd�Zdd�Zdd	�Zd
d�Z�fdd
�Zdd�Zdd�Z	�fdd�Z
�ZS)�_BaseGenericAliasTN��instrcCs||_||_||_d|_dSr�)�_instr�rir�)r�rCrUrrdrdrer��s
z_BaseGenericAlias.__init__cOsT|jstd|j�d|jj�d���|j|i|��}z||_W|Sty)Y|Sw)NzType z cannot be instantiated; use z
() instead)rVrjr�rir{�__orig_class__r�)r�r�rL�resultrdrdrer��s
���z_BaseGenericAlias.__call__cCsjg}|j|vr
|�|j�|�|�}||dd�D]}t|t�s&t|t�r+t|�Sq|�t�t|�S)Nr�)rir��indexrarS�
issubclassrrr)r�r��res�i�brdrdrer��s

�
z!_BaseGenericAlias.__mro_entries__cCs<|dvr|jp
|jjSd|jvrt|�st|j|�St|��)N>r{ryri)r�rir{rrRrr��r�rQrdrdrer��s
z_BaseGenericAlias.__getattr__cs4t|�s|dvrt��||�dSt|j||�dS)N>�_nparamsr
r	rVr�)rRr8�__setattr__�setattrri)r�rQ�valr<rdrer`�sz_BaseGenericAlias.__setattr__cC�|�t|��Sr��r�r`r�rdrdrer��r�z#_BaseGenericAlias.__instancecheck__cC�td��)NzBSubscripted generics cannot be used with class and instance checksr�r�rdrdrer���z#_BaseGenericAlias.__subclasscheck__cs&ttt���dd�t|j�D���S)NcSsg|]}t|�s|�qSrd)rR�rrQrdrdrer��r�z-_BaseGenericAlias.__dir__.<locals>.<listcomp>)rsr�r8�__dir__�dirrir�r<rdrerh�s�z_BaseGenericAlias.__dir__)r{rxryr�r�r�r�r`r�r�rhr>rdrdr<rerS�s
rScsxeZdZddedd��fdd�
Zdd�Zd	d
�Zdd�Zd
d�Ze	dd��Z
dd�Zdd�Zdd�Z
�fdd�Z�ZS)rhTNF)rUrr	r
csdt�j|||d�t|t�s|f}tdd�|D��|_t||d�|_||_||_|s0|j	|_	dSdS)NrTcss,�|]}|tur
dn|turdn|VqdS).rdN)�_TypingEllipsis�_TypingEmptyr�rdrdrer��s��
�z)_GenericAlias.__init__.<locals>.<genexpr>)r�)
r8r�rarrr�r�r�r	r
rx)r�rCr�rUrr	r
r<rdrer��s

��z_GenericAlias.__init__cC�&t|t�stS|j|jko|j|jkSr�)rarhrrir�r�rdrdrer�


�z_GenericAlias.__eq__cCrr�)rrir�r�rdrdrer
r z_GenericAlias.__hash__cCr�r�r�r,rdrdrer�r�z_GenericAlias.__or__cCr�r�r�r.rdrdrer�r�z_GenericAlias.__ror__csL|jttfvrtd|����t|t�s|f}tdd�|D��}|jr2tdd�|jD��r2t	||�}n	t
||t|j��tt
|j|���g}|jD]V}t||j�rjt|t�re�|}t|�sdtd|����n"�|}nt|tttjf�r�|j}|r�t�fdd�|D��}||}|jtjjkr�t|t�r�|�|�qH|�|�qH|�t|��S)Nz%Cannot subscript already-subscripted cs��|]}t|�VqdSr��rfr�rdrdrer�rz,_GenericAlias.__getitem__.<locals>.<genexpr>cs��|]}t|t�VqdSr��rarr~rdrdrer�r�zFExpected a list of types, an ellipsis, ParamSpec, or Concatenate. Got c3s�|]}�|VqdSr�rd)r�x��substrdrer�2r)rirrrjrarrr
�anyr�r�r�r��dictr�r�r	rrurhrrlrm�collections�abcr
r�r�r�)r�r��new_argsrc�	subparams�subargsrdrsrer�s>
�

��
z_GenericAlias.__getitem__cCs |j|j||j|j|j|jd�S)N�rrUr	r
)r=rir�rVr	r
�r�r�rdrdrer�;s�z_GenericAlias.copy_withcCsB|jr	d|j}nt|j�}d�dd�|jD��}|�d|�d�S)Nr��, cS�g|]}t|��qSrd�r}r�rdrdrer�E�z*_GenericAlias.__repr__.<locals>.<listcomp>�[�])r�r}ri�joinr�)r�rr�rdrdrer�@s

z_GenericAlias.__repr__cCsb|jr
t�|j}n|j}t|j�}t|�dkr*t|dt�r'|tur*|ds*|\}tj	||ffSr�)
r��globalsrirrr�r�rarr�r�)r�rCr�rdrdrer�Hs
z_GenericAlias.__reduce__cs�t|jt�r
td|����|jrt��|�S|jtur=t|vr!dS|�	|�}||dd�D]}t|t
�r<||ur<dSq.|jfS)Nr�rdr�)rarirkrjr�r8r�rrrYrS)r�r�r\r]r<rdrer�Ss

�z_GenericAlias.__mro_entries__)r{rxryrr�rrr�r�r�r�r�r�r�r�r>rdrdr<rerh�s�
$rhcsdeZdZddd��fdd�
Zedd��Zdd	�Zd
d�Z�fdd
�Zdd�Z	dd�Z
dd�Z�ZS)�_SpecialGenericAliasTNrTcs`|dur|j}t�j|||d�||_|jdkr"d|j�d�|_dSd|j�d|j�d�|_dS)NrTrvzA generic version of rg)r{r8r�r_rxryr�)r�rCZnparamsrUrr<rdrer�hs
z_SpecialGenericAlias.__init__csBt|t�s|f}d�t�fdd�|D��}t|||j�|�|�S)Nz*Parameters to generic types must be types.c3r�r�r�r�r�rdrer�wr�z3_SpecialGenericAlias.__getitem__.<locals>.<genexpr>)rarrr�r_r�r}rdr�rer�rs

z _SpecialGenericAlias.__getitem__cCst|j||j|jd�S)N)rrU)rhrir�rVr}rdrdrer�{s�z_SpecialGenericAlias.copy_withcCr�r�r�r�rdrdrer�r�z_SpecialGenericAlias.__repr__cs:t|t�rt|j|j�St|t�st||j�St��|�Sr�)rar�rZrirhr8r�r�r<rdrer��s


z&_SpecialGenericAlias.__subclasscheck__cCr�r�r�r�rdrdrer��r�z_SpecialGenericAlias.__reduce__cCr�r�r�r,rdrdrer��r�z_SpecialGenericAlias.__or__cCr�r�r�r.rdrdrer��r�z_SpecialGenericAlias.__ror__)
r{rxryr�r�r�r�r�r�r�r�r�r>rdrdr<rer�gs

r�cs$eZdZ�fdd�Zdd�Z�ZS)�_CallableGenericAliascsZ|j}t|�dkrt|d�rt���Sdd�dd�|dd�D���dt|d��d	�S)
Nrrztyping.Callable[[r~cSrrdr�r�rdrdrer��r�z2_CallableGenericAlias.__repr__.<locals>.<listcomp>rz], r�)r�r�rur8r�r�r}�r�r�r<rdrer��s
�
�z_CallableGenericAlias.__repr__cCsD|j}t|�dkrt|d�st|dd��|df}tjt|ffS)Nrrr)r�r�rursr�r�r
r�rdrdrer��sz _CallableGenericAlias.__reduce__)r{rxryr�r�r>rdrdr<rer��s	r�c@s(eZdZdd�Zdd�Zedd��ZdS)�
_CallableTypecCst|j||j|jttfdd�S)NTr|)r�rir�rVrrr}rdrdrer��s
�z_CallableType.copy_withcCsPt|t�rt|�dkrtd��|\}}t|t�rt|�|f}n||f}|�|�S)Nrz6Callable must be used as Callable[[arg, ...], result].)rarrr�rjrs�__getitem_inner__)r�r�r�rXrdrdrer��s

z_CallableType.__getitem__cCsb|\}}d}t||�}|tur|�t|f�St|t�s|f}tdd�|D��}||f}|�|�S)Nz.Callable[args, result]: result must be a type.csrnr�ro)rrcrdrdrer��rz2_CallableType.__getitem_inner__.<locals>.<genexpr>)rq�Ellipsisr�rjrarr)r�r�r�rXrordrdrer��s



z_CallableType.__getitem_inner__N)r{rxryr�r�r�r�rdrdrdrer��s
r�c@seZdZedd��ZdS)�
_TupleTypecs�|dkr
|�tf�St|t�s|f}t|�dkr.|ddur.d�t|d��}|�|tf�Sd�t�fdd	�|D��}|�|�S)
Nrdrr�.z Tuple[t, ...]: t must be a type.rz*Tuple[t0, t1, ...]: each t must be a type.c3r�r�r�r�r�rdrer��r�z)_TupleType.__getitem__.<locals>.<genexpr>)r�rkrarrr�rqrj)r�r�r�rdr�rer��s

z_TupleType.__getitem__N)r{rxryr�r�rdrdrdrer��sr�csPeZdZdd�Zdd�Zdd�Z�fdd�Zd	d
�Zdd�Z�fd
d�Z	�Z
S)r�cCst|Sr�r�r}rdrdrer��rfz_UnionGenericAlias.copy_withcCs(t|ttjf�s
tSt|j�t|j�kSr�)rar�rlrmrr�r�r�rdrdrer�sz_UnionGenericAlias.__eq__cCstt|j��Sr�)r�	frozensetr�r�rdrdrer�r�z_UnionGenericAlias.__hash__csd|j}t|�dkr-|dtd�urdt|d��d�S|dtd�ur-dt|d��d�St���S)Nrrztyping.Optional[r�r�)r�r�r`r}r8r�r�r<rdrer��s
z_UnionGenericAlias.__repr__cCrcr�rdr�rdrdrer��r�z$_UnionGenericAlias.__instancecheck__cCs |jD]
}t||�r
dSqdS�NT)r�rZ)r�r�rcrdrdrer��s


��z$_UnionGenericAlias.__subclasscheck__cst���\}\}}|t|ffSr�)r8r�r)r�r�rCr�r<rdrer��sz_UnionGenericAlias.__reduce__)r{rxryr�rrr�r�r�r�r>rdrdr<rer��s	r�cCsdd�|D�S)Ncss�|]	}|t|�fVqdSr�)r`r�rdrdrer��s�z'_value_and_type_iter.<locals>.<genexpr>rd)r�rdrdrer�r�rc@seZdZdd�Zdd�ZdS)r�cCs*t|t�stStt|j��tt|j��kSr�)rar�rr�rr�r�rdrdrer�s
z_LiteralGenericAlias.__eq__cCsttt|j���Sr�)rr�rr�r�rdrdrer�z_LiteralGenericAlias.__hash__N)r{rxryrrrdrdrdrer��sr�c�eZdZ�fdd�Z�ZS)rtcszt|dttf�rg|dd��|d�RSt|dt�r,g|dd��|dj�R}nt|dt�s7td��t��|�S)Nrr)	rarsrrrtr�rrjr8r�r}r<rdrer�	sz"_ConcatenateGenericAlias.copy_with)r{rxryr�r>rdrdr<rertsrtcs2eZdZ	dZdZedd��Z�fdd�Z�ZS)rrdFcCs�t|t�s|f}|s|turtd|j�d���tdd�|D��}|ttfvrLtdd�|D��s8td|j�d���t	t
|��t	|�krKtd|j�d���ntd	d�|jD��r\t
||�}n	t||t	|j��t||ttfd
d�S)NzParameter list to z[...] cannot be emptycsrnr�ror�rdrdrer�2rz,Generic.__class_getitem__.<locals>.<genexpr>css�|]
}t|ttf�VqdSr�)rarrr�rdrdrer�5r�zParameters to zF[...] must all be type variables or parameter specification variables.z[...] must all be uniquecsrpr�rqr~rdrdrer�>r�Tr)rarrrrjryrr�allr{r�r�rur�r�r�rhrr)r�r�rdrdre�__class_getitem__+s0
�����zGeneric.__class_getitem__c
st�j|i|��g}d|jvrt|jv}n
t|jvo|jdk}|r&td��d|jvr�t|jt	t
f�}d}|jD]}t|t�rO|j
turO|durLtd��|j}q8|dur�t|�}t|��|�ks�d��fdd�|D��}d�dd�|D��}	td	|�d
|	�d���|}t|�|_dS)N�__orig_bases__rz!Cannot inherit from plain Genericz0Cannot inherit from Generic[...] multiple types.r~c3s �|]}|�vrt|�VqdSr��rbr~�Zgvarsetrdrer�b��z,Generic.__init_subclass__.<locals>.<genexpr>csrnr�r�)r�grdrdrer�crzSome type variables (z) are not listed in Generic[r�)r8r�rrr��	__bases__r{rjr�rrrarhrir�r�r�rr)
r�r�rLr��errorZgvars�baseZtvarsetZs_varsZs_argsr<r�rer�Fs<




��

�zGeneric.__init_subclass__)	r{rxryr��_is_protocolr�r�r�r>rdrdr<rers
rc@�eZdZdS)rkN�r{rxryrdrdrdrerkj�rkc@r�)rjNr�rdrdrdrerjqr�rj)r�r�rWr��_is_runtime_protocol)�__abstractmethods__�__annotations__rr�r�rx�__new__r��__subclasshook__r�r��_MutableMapping__markercCst	t�}|jdd�D],}|jdvrqt|di�}t|j���t|���D]}|�d�s6|tvr6|�	|�q&q|S)Nr)rrr�Z_abc_)
r��__mro__r{rrsr�keysrO�EXCLUDED_ATTRIBUTES�add)r�Zattrsr��annotationsrQrdrdre�_get_protocol_attrs�s

��r�cst�fdd�t��D��S)Nc3s �|]}tt�|d��VqdSr�)rnrrg�r�rdrer��r�z,_is_callable_members_only.<locals>.<genexpr>)r�r�r�rdr�re�_is_callable_members_only�sr�cOstt|�}|jrtd��|jturdS|jD]}|j�dt�}|tur'||_nqtj|_|j|g|�Ri|��dS)Nz Protocols cannot be instantiatedr�)	r`r�rjr��_no_init_or_replace_initr�rr�object)r�r�rLr�r�Zinitrdrdrer��s

�r�r�r6c	Cs4z
t�|d�j�d|�WSttfyYdSw)Nr�r{)rr9r:rr�r$)�depth�defaultrdrdre�_caller�s
�r��c	Cs2	zt�|�jddvWSttfyYdSw)Nr{)rxr�T)rr9r:r�r$�r�rdrdre�_allow_reckless_class_checks�s�r�)
r
r)rrr+rr'rr-r0�AbstractContextManager�AbstractAsyncContextManager)zcollections.abc�
contextlibcr�)�
_ProtocolMetacs�t�dd�rt�dd�stdd�std��t�dd�rt��r't�j��r'dS�jr:t��fdd	�t��D��r:dSt	��
��S)
Nr�Fr�rr��LInstance and class checks can only be used with @runtime_checkable protocolsTc3s:�|]}t�|�ott�|d��pt�|�duVqdSr�)�hasattrrnrrg�r��instancerdrer��s�
�
�z2_ProtocolMeta.__instancecheck__.<locals>.<genexpr>)rr�rjr�rZr=r�r�r�r8r�r�r<r�rer��s&
�
���
��z_ProtocolMeta.__instancecheck__)r{rxryr�r>rdrdr<rer��sr�cs*eZdZ	dZdZdZ�fdd�Z�ZS)rrdTFcs�t�j|i|���j�dd�stdd��jD���_�fdd�}d�jvr)|�_�js.dS�jD]#}|tt	fvsT|j
tvrF|jt|j
vsTt
|t	�rN|jsTtd|��q1t�_dS)	Nr�Fcss�|]}|tuVqdSr�)r)rr]rdrdrer�rz-Protocol.__init_subclass__.<locals>.<genexpr>cs��j�dd�s	tSt�dd�st�rtStd��t��s%t�r!tStd��t|t�s.td��t	��D];}|j
D]1}||jvrM|j|durKtSn t|di�}t|tjj
�rh||vrht|t�rh|jrhnq7tSq2dS)	Nr�Fr�r�z<Protocols with non-method members don't support issubclass()z"issubclass() arg 1 must be a classr�T)rrrrr�rjr�rar`r�r�rwrxr!rZrr�)r�rQr�r�r�rdre�_proto_hooks<


����z/Protocol.__init_subclass__.<locals>._proto_hookr�z7Protocols can only inherit from other protocols, got %r)r8r�rrrur�r�r�r�rrx�_PROTO_ALLOWLISTr{rZrjr�r�)r�r�rLr�r�r<r�rer�
s*
&

����
zProtocol.__init_subclass__)r{rxryr�r�r�r�r>rdrdr<rer�sr)�	metaclasscsReZdZ	�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z�fd
d�Z	�Z
S)�_AnnotatedAliascs2t|t�r
|j|}|j}t��||�||_dSr�)rar��__metadata__rir8r�)r�rC�metadatar<rdrer�Us



z_AnnotatedAlias.__init__cCs|d}t||j�S)Nr)r�r�)r�r�Znew_typerdrdrer�\sz_AnnotatedAlias.copy_withcCs$d�t|j�d�dd�|jD���S)Nztyping.Annotated[{}, {}]r~csrnr�)rwr�rdrdrer�drz+_AnnotatedAlias.__repr__.<locals>.<genexpr>)�formatr}rir�r�r�rdrdrer�as�z_AnnotatedAlias.__repr__cCstjt|jf|jffSr�)r�r�rrir�r�rdrdrer�gs�z_AnnotatedAlias.__reduce__cCrlr�)rar�rrir�r�rdrdrerlrmz_AnnotatedAlias.__eq__cCrr�)rrir�r�rdrdrerrr z_AnnotatedAlias.__hash__cs|dvrdSt��|�S)N>r{ryr)r8r�r^r<rdrer�usz_AnnotatedAlias.__getattr__)r{rxryr�r�r�r�rrr�r>rdrdr<rer�Msr�c@s.eZdZ	dZdd�Zedd��Zdd�ZdS)	rrdcOre)Nz&Type Annotated cannot be instantiated.r��r�r�rLrdrdrer��rfzAnnotated.__new__cCsNt|t�rt|�dkrtd��d}t|d|dd�}t|dd��}t||�S)NrzUAnnotated[...] should be used with at least two arguments (a type and an annotation).z$Annotated[t, ...]: t must be a type.rTr\r�)rarrr�rjrqr�)r�r�rorCr�rdrdrer��s
zAnnotated.__class_getitem__cOstd�|j���)NzCannot subclass {}.Annotated)rjr�rxr�rdrdrer��s
�zAnnotated.__init_subclass__N)r{rxryr�r�r�r�r�rdrdrdrer{s

rcCs(	t|t�r	|jstd|��d|_|S)NzB@runtime_checkable can be only applied to protocol classes, got %rT)rZrr�rjr�r�rdrdrerW�s�rWcCs	|Sr�rd)�typrbrdrdrerJ�srJc
Cs�	z|j}WntyiYSw|j}|j}|d|�}|jp"d}|j}|r,t|�ni}|t|�}t||d�|�D]\}}	|	||<q=|S)Nrd)	�__code__r��co_argcount�co_varnames�__defaults__�__kwdefaults__rvr�r�)
r�rZ	pos_countZ	arg_names�defaultsZ
kwdefaultsr[Z
pos_offsetr�valuerdrdre�
_get_defaults�s 
�

r�c
CsB	t|dd�r	iSt|t�r�i}t|j�D]d}|dur(ttj�|jd�di�}n|}|j	�di�}t|t
j�r9i}|durCtt
|��n|}|durR|durR||}}|��D]"\}	}
|
durbtd�}
t|
t�rnt|
ddd�}
t|
||�}
|
||	<qVq|r~|Sdd�|��D�S|dur�t|t
j�r�|j	}n|}t|d	�r�|j}t|d	�s�t|d
i�}|dur�|}n|dur�|}t|dd�}|dur�t|t�r�iStd�|���t|�}t|�}|��D]7\}	}
|
dur�td�}
t|
t�r�t|
t|t
j�dd�}
t|
||�}
|	|v�r||	du�rt|
}
|
||	<q�|�r|Sdd�|��D�S)
N�__no_type_check__rr�FT)rpr_cS�i|]	\}}|t|��qSrd��_strip_annotations�r�kr�rdrdre�
<dictcomp>+�z"get_type_hints.<locals>.<dictcomp>�__wrapped__�__globals__z1{!r} is not a module, class, method, or function.cSr�rdr�r�rdrdrer�Sr�)rrar`�reversedr�rrrrxrrl�GetSetDescriptorTyperv�vars�itemsrbrr��
ModuleTyper�r��_allowed_typesrjr�r�r)
r|r�r�Zinclude_extrasZhintsr�Zbase_globals�annZbase_localsrr�Znsobjr�rdrdrerN�sx 



�

��
�
�
rNcCs�	t|t�rt|j�St|t�r&tdd�|jD��}||jkr!|S|�|�St|t�rBtdd�|jD��}||jkr<|St|j|�St|t	j
�r`tdd�|jD��}||jkrY|St�t
j|�S|S)Ncsrnr�r�r�rdrdrer�\rz%_strip_annotations.<locals>.<genexpr>csrnr�r�r�rdrdrer�arcsrnr�r�r�rdrdrer�fr)rar�r�rirhrrr�r�rrlrmr�r�r�r�)r�Z
stripped_argsrdrdrer�Vs&







r�cCsJ	t|t�rtSt|ttttf�r|jS|turtSt|t	j
�r#t	j
SdSr�)rar�rrSrrUrVrirrlrm��tprdrdrerMns
�rMcCs�	t|t�r
|jf|jSt|ttf�r8|j}|jtjj	ur6t
|�dkr*t|d�s6t|dd��|df}|St|t
j�rA|jSdS)Nrrrrd)rar�rir�rhrr�rwrxr
r�rursrlrm)r�r[rdrdrerL�s

rLcCs	t|t�Sr�)ra�_TypedDictMetar�rdrdrerO�s

rOcCs�	t|t�r;|j��}|j��D]\}}||j|fvr!|�|�q|��D]}t|tj	�r1d|_
t|t�r:t|�q&zd|_
W|StyKY|Swr�)
rar`r�copyr�r��pop�valuesrlrzr�rQrj)rcZ	arg_attrsrQrbr|rdrdrerQ�s(


�
���rQcs	t����fdd��}|S)Ncs�|i|��}t|�}|Sr�)rQ)r�r�r��r�rdre�wrapped_decorator�sz2no_type_check_decorator.<locals>.wrapped_decorator)r�r�)r�r�rdr�rerR�srRcOs
	td��)Nz�You 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�rdrdre�_overload_dummy�s�r�cCs	tSr�)r�)r�rdrdrerT�srTcCs	|Sr�rd)�frdrdrerK�srK�T�KT�VT�T_co)r*�V_co�VT_co�T_contra)r+�CT_co)r*r)rIra�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.
    rrrrrTa@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=r:r?r@rr/r;r<ra�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@�$eZdZ	dZedefdd��ZdS)r6rd�returncC�dSr�rdr�rdrdre�__int__��zSupportsInt.__int__N)r{rxryr�r�intr�rdrdrdrer6��
r6c@r�)r4rdr�cCr�r�rdr�rdrdre�	__float__�r�zSupportsFloat.__float__N)r{rxryr�r�floatr�rdrdrdrer4�r�r4c@r�)r3rdr�cCr�r�rdr�rdrdre�__complex__�r�zSupportsComplex.__complex__N)r{rxryr�r�complexr�rdrdrdrer3�r�r3c@r�)r2rdr�cCr�r�rdr�rdrdre�	__bytes__�r�zSupportsBytes.__bytes__N)r{rxryr�r�bytesr�rdrdrdrer2�r�r2c@r�)r5rdr�cCr�r�rdr�rdrdre�	__index__�r�zSupportsIndex.__index__N)r{rxryr�rr�r�rdrdrdrer5�r�r5c@r�)r1rdr�cCr�r�rdr�rdrdre�__abs__�r�zSupportsAbs.__abs__N)r{rxryr�rr�rrdrdrdrer1�r�r1c@s*eZdZ	dZeddedefdd��ZdS)	r7rdr�ndigitsr�cCr�r�rd)r�rrdrdre�	__round__�r�zSupportsRound.__round__N�r)r{rxryr�rr�r�rrdrdrdrer7�s
r7rdcCs@dd�|D�}dd�|D�}tj||||d�}||_|j_|S)NcSsg|]\}}|�qSrdrd�r�nr�rdrdrer��r�z!_make_nmtuple.<locals>.<listcomp>cSs$i|]\}}|t|d|�d���qS)zfield z annotation must be a typer�rrdrdrer��s�z!_make_nmtuple.<locals>.<dictcomp>�r�r^)rw�
namedtupler�r�)rrlr^r��fields�nm_tplrdrdre�
_make_nmtuple�s��r
>
�_replace�_asdictr��_make�_field_defaultsZ_source�_fieldsr�r��__getnewargs__>r{r�rxc@r�)�NamedTupleMetac	
s���di�}g}|D]&}|�vr|�|�q
|r0td|�dt|�dkr%dnd�dd�|�����q
t||���fd	d
�|D��dd�}�D]}|tvrRtd
|��|t	vrc||j
vrct||�|�qF|S)Nr�zNon-default namedtuple field z cannot follow default fieldr��s�� r~csg|]}�|�qSrdrd)rr��nsrdrer��r�z*NamedTupleMeta.__new__.<locals>.<listcomp>rxrz&Cannot overwrite NamedTuple attribute )rr�rjr�r�r
r��_prohibitedr��_specialrra)	r��typenamer�rrlZ
default_namesZ
field_namer	�keyrdrrer��s.
���
��zNamedTupleMeta.__new__N)r{rxryr�rdrdrdrer�src	Ksb	|dur
|��}n|rtd��zt�d�j�dd�}Wn
ttfy)d}Ynwt|||d�S)NzIEither list of fields or keywords can be provided to NamedTuple, not bothr�r{r6�r^)	r�rjrr9r:rr�r$r
)rrrLr^rdrdrerA�s
�rAcCst|�dkr
td��tfS)Nr�z5Multiple inheritance with NamedTuple is not supported)r�rj�_NamedTuple�r�rdrdre�_namedtuple_mro_entries	src@s&eZdZddd�ZeZdd�ZeZdS)r�Tcs	|D]}t|�turtd��qt�t|tf|��i}|�di�}t|���}d���fdd�|��D�}t�}	t�}
|D] }|�	|j
�di��|	�	|j
�dd��|
�	|j
�dd��q=|�	|�|rk|	�	|�n|
�	|�|�_t|	��_
t|
��_t�d	�s�|�_�S)
NzHcannot inherit from both a TypedDict type and a non-TypedDict base classr�z?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typecs"i|]
\}}|t|��jd��qS)r)rqrx)rrr��roZtp_dictrdrer�4	s��z*_TypedDictMeta.__new__.<locals>.<dictcomp>�__required_keys__rd�__optional_keys__�	__total__)r`r�rjr�rvrr�r�r��updaterr�r�r r!r�r")r�rr�r�totalr�r�Zown_annotationsZown_annotation_keysZ
required_keysZ
optional_keysrdrrer�"	s:��




z_TypedDictMeta.__new__cCre)Nz4TypedDict does not support instance and class checksr�)r�r�rdrdrer�O	rKz _TypedDictMeta.__subclasscheck__N)T)r{rxryr�rvr�r�r�rdrdrdrer�!	s

+r��r$c	Ksl	|dur|}n|rtd��dt|�i}zt�d�j�dd�|d<Wnttfy-Ynwt|d||d�S)	Nz@TypedDict takes either a dict or keyword arguments, but not bothr�r�r{r6rxrdr%)	rjrvrr9r:rr�r$r�)rrr$rLrrdrdrerBV	s)�rBcCstfSr�)�
_TypedDictrrdrdre�<lambda>�	sr'c@s>eZdZ	dd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)rPcCsD||_d|vr|�d�d}||_||_t�}|dkr ||_dSdS)Nrgrr7)ry�
rpartitionr{Z
__supertype__r�rx)r�rr�r;rdrdrer��	s
�zNewType.__init__cCs|j�d|j��S)Nrg)rxryr�rdrdrer��	r�zNewType.__repr__cCs|Sr�rd)r�rrrdrdrer��	r�zNewType.__call__cCr�r�)ryr�rdrdrer��	r�zNewType.__reduce__cCr�r�r�r�rdrdrer��	r�zNewType.__or__cCr�r�r�r�rdrdrer��	r�zNewType.__ror__N)	r{rxryr�r�r�r�r�r�rdrdrdrerP�	s
rPc@s�eZdZ	dZeedefdd���Zeedefdd���Zed7dd	��Z	eede
fd
d���Zedefdd
��Z
ed7dd��Zede
fdd��Zed8dedefdd��Zede
fdd��Zed8dedefdd��Zed8dedeefdd��Zed9ded edefd!d"��Zede
fd#d$��Zedefd%d&��Zed:d'edefd(d)��Zede
fd*d+��Zed,edefd-d.��Zed/eeddfd0d1��Zed;d3d4��Zed7d5d6��ZdS)<rErdr�cCr�r�rdr�rdrdre�mode�	�zIO.modecCr�r�rdr�rdrdrer�	r*zIO.nameNcCr�r�rdr�rdrdre�close�	r�zIO.closecCr�r�rdr�rdrdre�closed�	r*z	IO.closedcCr�r�rdr�rdrdre�fileno�	r�z	IO.filenocCr�r�rdr�rdrdre�flush�	r�zIO.flushcCr�r�rdr�rdrdre�isatty�	r�z	IO.isattyrrcCr�r�rd)r�rrdrdre�read�	r�zIO.readcCr�r�rdr�rdrdre�readable�	r�zIO.readable�limitcCr�r�rd)r�r2rdrdre�readline�	r�zIO.readline�hintcCr�r�rd)r�r4rdrdre�	readlines
r�zIO.readlinesr�offset�whencecCr�r�rd)r�r6r7rdrdre�seek
r�zIO.seekcCr�r�rdr�rdrdre�seekable

r�zIO.seekablecCr�r�rdr�rdrdre�tell
r�zIO.tell�sizecCr�r�rd)r�r;rdrdre�truncate
r�zIO.truncatecCr�r�rdr�rdrdre�writable
r�zIO.writablercCr�r�rd�r�rrdrdre�write
r�zIO.write�linescCr�r�rd)r�r@rdrdre�
writelines
r�z
IO.writelines�
IO[AnyStr]cCr�r�rdr�rdrdre�	__enter__"
r�zIO.__enter__cCr�r�rd)r�r`r��	tracebackrdrdre�__exit__&
r�zIO.__exit__)r�N)rrr�)r�rB)r{rxryr�rMrrbr)rr+r%r,r�r-r.r/rIr0r1r3r=r5r8r9r:r<r=r?rArCrErdrdrdrerE�	s\rEc@s>eZdZ	dZedeeefdefdd��Z	ed	dd��Z
dS)
rDrdrr�cCr�r�rdr>rdrdrer?0
r�zBinaryIO.writecCr�r�rdr�rdrdrerC4
r�zBinaryIO.__enter__N)r�rD)r{rxryr�rrr��	bytearrayr�r?rCrdrdrdrerD+
srDc@s�eZdZ	dZeedefdd���Zeedefdd���Z	eede
efdd���Zeedefd	d
���Z
eedefdd���Zedd
d��ZdS)rHrdr�cCr�r�rdr�rdrdre�buffer>
r*z
TextIO.buffercCr�r�rdr�rdrdre�encodingC
r*zTextIO.encodingcCr�r�rdr�rdrdre�errorsH
r*z
TextIO.errorscCr�r�rdr�rdrdre�line_bufferingM
r*zTextIO.line_bufferingcCr�r�rdr�rdrdre�newlinesR
r*zTextIO.newlinescCr�r�rdr�rdrdrerCW
r�zTextIO.__enter__N)r�rH)r{rxryr�rMrrDrGrbrHrrIr%rJr	rKrCrdrdrdrerH9
s(rHc@s"eZdZ	gd�ZeZeZeZdS)�io)rErHrDN)r{rxry�__all__rErHrDrdrdrdrerL\
srLz.ioc@seZdZ	ddgZeZeZdS)�rerGrFN)r{rxryrMrGrFrdrdrdrerNk
s
rNz.rer�r")r�r6)r�)NNF)rd)�rxrrrwZcollections.abcr�r�r�rNZ	stdlib_rerrlrrrrrMrfrqrur}r�r�r�r�r�r�r�r�r�r�r�r�rkr�r	rSrr
rrrrZrr[rr#rrUrVrrRrSrhr�r�r�r�r�rr�rtrrkrjZ_TYPING_INTERNALSZ_SPECIAL_NAMESr�r�r�r�r�r�r�r�rr�rrWrJr�rz�BuiltinFunctionType�
MethodTyper�r�rNr�rMrLrOrQrRr�rTrKr�r�r�r�r�r�r�r`r�r�rbrIZ_aliasrr)r,r+r*rrr0r'rr-r
r�r?rr%r!r#r&r$rrrrrsr=�dequer:r�r@r"r rr(r�rr�r/rvr;�defaultdictr<r>r9r8rCr.rr6r4r3r2r5r1r7r
rrrrAr�rrr�r�rBr&rPrXrYrErDrHrLr{rrGrFrdrdrdre�<module>s�g	"
	
+




'
!


/@"ADMp+#"V


�	b.5�
i	�
�	�						
	
#59
.c#
	


?>