Your IP : 3.15.26.184


Current Path : /usr/lib64/python3.6/__pycache__/
Upload File :
Current File : //usr/lib64/python3.6/__pycache__/typing.cpython-36.opt-2.pyc

3


 \�9�D@s�ddlZddlmZmZddlZddlZddlZddlZddlZddl	Z	yddl
jZWnek
rrddlZYnXej
dd�d�kr�ddlZyddl	mZmZmZWn4ek
r�eej�Zee�j�Zeej�ZYnXddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:g4Zd;d<�Zd=d>�ZGd?d@�d@e�ZGdAdB�dBedCdD�ZGdEdF�dFedCdG�ZGdHdI�dIedCdG�ZGdJdK�dKedCdG�ZdLdM�Z dNdO�Z!dPdQ�Z"dRdS�Z#dTdU�Z$GdVdW�dWedCdG�Z%e%dCdG�Z&GdXdY�dYedCdG�Z'e'dCdG�Z(GdZd�dedCdG�Z)e)d[�Z*e)d\�Z+e)d]�Z,e)d^dCd_�Z-e)d`dCd_�Z.e)dadCd_�Z/e)dbdCdc�Z0e)d2e1e�Z2ddde�Z3d�dfdg�Z4dhdi�Z5djdk�Z6gZ7dldm�Z8Gdndo�doedCdG�Z9e9dCdG�Z:Gdpdq�dqedCdG�Z;e;dCdG�Z<drds�Z=dtdu�Z>dvdw�Z?Gdxd�deej@�ZAdZBdydz�ZCGd{d
�d
eAd|�ZBGd}d~�d~�ZDGdd��d��ZEGd�d��d�eA�ZFGd�d�deGeGeFd��ZHGd�d��d�eA�ZIGd�d�dejJeId��ZJGd�d��d�edCdG�ZKeKdCdG�ZLd�d3�ZMd�d��ZNe	jOe	jPe	jQe	jReeefZSd�d�d4�ZTd�d6�ZUd�d7�ZVd�d��ZWd�d8�ZXGd�d��d�eA�ZYGd�d��d�eYd|�ZZej[Z[e\ed���rjGd�d��d�eBe-ej]d��Z]ej^d��e\ed���r�Gd�d��d�e]e.eBe-e0e.fej_d��Z_ej^d��e\ed���r�Gd�d��d�eBe-ej`d��Z`Gd�d��d�e`e-ejad��Zaej^d��ej^d��Gd�d�deBe-ejbd��ZbGd�d�debe-ejcd��ZcGd�d'�d'eZ�ZdGd�d&�d&eZ�ZeGd�d%�d%eZ�ZfGd�d$�d$eZ�ZgGd�d#�d#eZe-�ZhGd�d(�d(eZe-�Zie\ed"��r�Gd�d"�d"ebe-ejjd��ZjnGd�d"�d"eZe-�ZjejkZkGd�d�deBe-ejld��Zle\ed���r*Gd�d��d�ekebe-ele-ejmd��Zmej^d��e\ed���rRGd�d�deme-ejnd��Zon"Gd�d�dekebe-ele-ejnd��ZoGd�d�deoe*ejpd��Zpe\ed���r�Gd�d�deme+eBe+e/fejqd��Zqn,Gd�d�dekebe+ele+eBe+e/fejqd��ZqGd�d�deqe+e,fejrd��Zre\ed"��rhe\ed���rDGd�d�deje-eme-ejsd��Zsn"Gd�d�dekeje-ele-ejsd��Zsn"Gd�d�dekebe-ele-ejsd��ZsGd�d�dese*ejtd��ZtGd�d�deseuejvd��ZvGd�d-�d-ewete*ewd��ZxGd�d*�d*ejyete*ejyd��ZzGd�d.�d.e{epe*e{d��ZnGd�d/�d/e|eoe-e|d��Z}Gd�d�dekebe-ej~d��Z~Gd�d�de~e+eoe+ejd��ZGd�d�de~eHe+e/feoeHe+e/feBe+e/fej�d��Z�Gd�d!�d!e~e/ej�d��Z�e\ed���r�Gd�d�deBe-ej�d��Z�nGd�d�deBe-�Z�e\edÃ�	r(Gd�dńd�eBe-ej�d��Z�ej^dŃnej
dd�d�k�	rDe�dǃGd�d+�d+e�ere+e,fe�d��Z�Gd�d,�d,ej�ere+e,fej�d��Z�Gd�d)�d)ej�e�e*eufej�d��Z�e\ed˃�	r�ej^d˃Gd�d˄d�ej�ere+e,fej�d��Z�e\ed1��	r�ej�Z�ne	j�Z�Gd�d1�d1ece-eBe-e0e.fe�d��Z�e\ed΃�
rVGd�d΄d�eae-eBe-e0fej�d��Z�ej^d΃e)d�dCedэZ�Gd�d
�d
eBe�ed��Z�d�dԄZ�ej
dd�d�kZ��dZ��dZ�Gd�d�d�e�Z�Gd�d0�d0e�d|�Z�d�d5�Z�eZ�d�Z�Gd�d�d�eBe2�Z�Gd�d�d�e�e1�Z�Gd�d�d�e�e�Z�Gd�d�d�Z�e�d�e�_�e�ej�e�j�<ed�e2eej�d��d�d���Z�ed�e2eej�d�d��d�d���Z�Gd�d��d��Ze�d�e_�eej�ej�<dS(�N)�abstractmethod�abstractproperty���)�WrapperDescriptorType�MethodWrapperType�MethodDescriptorType�Any�Callable�ClassVar�Generic�Optional�Tuple�Type�TypeVar�Union�AbstractSet�GenericMeta�
ByteString�	Container�ContextManager�Hashable�	ItemsView�Iterable�Iterator�KeysView�Mapping�MappingView�MutableMapping�MutableSequence�
MutableSet�Sequence�Sized�
ValuesView�
Reversible�SupportsAbs�
SupportsBytes�SupportsComplex�
SupportsFloat�SupportsInt�
SupportsRound�Counter�Deque�Dict�DefaultDict�List�Set�	FrozenSet�
NamedTuple�	Generator�AnyStr�cast�get_type_hints�NewType�
no_type_check�no_type_check_decorator�overload�Text�
TYPE_CHECKINGcCs"tjdd�dkr|jS|jSdS)Nrr)rr)�sys�version_info�__qualname__�__name__)�x�rC�/usr/lib64/python3.6/typing.py�	_qualnamegsrEcCs&d}|jd�r"||kr"|dd�}|S)N�
_TypeAlias�_ForwardRef�_TypingBase�_FinalTypingBase�_�)rFrGrHrI)�
startswith)ZnmZ	whitelistrCrCrD�
_trim_nameosrMcsFeZdZdZdd��fdd�
Zdd�Zdd�Zd	d
�Zdd�Z�Z	S)
�
TypingMetaF)�_rootcs2|s tddjtt|��pd��t�j||||�S)NzCannot subclass %sz, z())�	TypeError�join�map�
_type_repr�super�__new__)�cls�name�bases�	namespacerO)�	__class__rCrDrU�szTypingMeta.__new__cOsdS)NrC)�self�args�kwdsrCrCrD�__init__�szTypingMeta.__init__cCs|S)NrC)r[�globalns�localnsrCrCrD�
_eval_type�szTypingMeta._eval_typecCsdS)NrC)r[�tvarsrCrCrD�_get_type_vars�szTypingMeta._get_type_varscCstt|��}d|j|fS)Nz%s.%s)rMrE�
__module__)r[�qnamerCrCrD�__repr__�szTypingMeta.__repr__)
rArdr@�_is_protocolrUr^rarcrf�
__classcell__rCrC)rZrDrNvs

rNcsHeZdZdZdd�Z�fdd�Zdd�Zdd	�Zd
d�Zdd
�Z	�Z
S)rH�__weakref__cOsdS)NrC)r[r\r]rCrCrDr^�sz_TypingBase.__init__cs@t|�dkr4t|dt�r4t|dt�r4td|��t�j|�S)NrrrKzCannot subclass %r)�len�
isinstance�str�tuplerPrTrU)rVr\r])rZrCrDrU�s
z_TypingBase.__new__cCs|S)NrC)r[r_r`rCrCrDra�sz_TypingBase._eval_typecCsdS)NrC)r[rbrCrCrDrc�sz_TypingBase._get_type_varscCs"t|�}tt|��}d|j|fS)Nz%s.%s)�typerMrErd)r[rVrerCrCrDrf�sz_TypingBase.__repr__cOstdt|���dS)NzCannot instantiate %r)rPrn)r[r\r]rCrCrD�__call__�sz_TypingBase.__call__)ri)rArdr@�	__slots__r^rUrarcrfrorhrCrC)rZrDrH�srHT)�	metaclassrOcs.eZdZfZdd��fdd�
Zdd�Z�ZS)rIF)rOcs0t�j|f|�|�}|dkr |Std|��dS)NTzCannot instantiate %r)rTrUrP)rVrOr\r]r[)rZrCrDrU�sz_FinalTypingBase.__new__cCstt|�j�S)N)rMrnrA)r[rCrCrD�
__reduce__�sz_FinalTypingBase.__reduce__)rArdr@rprUrrrhrCrC)rZrDrI�srI)rOcsPeZdZdZ�fdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
�ZS)rG�__forward_arg__�__forward_code__�__forward_evaluated__�__forward_value__cstt�j|�t|t�s$td|f��yt|dd�}Wn"tk
rVtd|f��YnX||_||_d|_	d|_
dS)Nz,Forward reference must be a string -- got %rz<string>�evalz1Forward reference must be an expression -- got %rF)rTr^rkrlrP�compile�SyntaxErrorrsrtrurv)r[�arg�code)rZrCrDr^�s
z_ForwardRef.__init__cCsf|js||k	r`|dkr*|dkr*i}}n|dkr8|}n|dkrD|}tt|j||�d�|_d|_|jS)Nz*Forward references must evaluate to types.T)ru�_type_checkrwrtrv)r[r_r`rCrCrDra�s
z_ForwardRef._eval_typecCs&t|t�stS|j|jko$|j|jkS)N)rkrG�NotImplementedrsrv)r[�otherrCrCrD�__eq__�s
z_ForwardRef.__eq__cCst|j|jf�S)N)�hashrsrv)r[rCrCrD�__hash__sz_ForwardRef.__hash__cCstd��dS)Nz4Forward references cannot be used with isinstance().)rP)r[�objrCrCrD�__instancecheck__sz_ForwardRef.__instancecheck__cCstd��dS)Nz4Forward references cannot be used with issubclass().)rP)r[rVrCrCrD�__subclasscheck__sz_ForwardRef.__subclasscheck__cCsd|jfS)Nz_ForwardRef(%r))rs)r[rCrCrDrf	sz_ForwardRef.__repr__)rsrtrurv)rArdr@rpr^rarr�r�r�rfrhrCrC)rZrDrG�srGc@sHeZdZdZdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dS)rFrW�type_var�	impl_type�type_checkercCs||_||_||_||_dS)N)rWr�r�r�)r[rWr�r�r�rCrCrDr^sz_TypeAlias.__init__cCsd|jt|j�fS)Nz%s[%s])rWrSr�)r[rCrCrDrf,sz_TypeAlias.__repr__cCs�t|jt�std|��|jjrJt|t�rJt||jj�sJtd||jf��t|t�rj||jk	rjtd|��|j|j||j	|j
�S)Nz#%s cannot be further parameterized.z&%s is not a valid substitution for %s.z%s cannot be re-parameterized.)rkr�rrP�__constraints__rn�
issubclassrZrWr�r�)r[Z	parameterrCrCrD�__getitem__/s
z_TypeAlias.__getitem__cCs&t|t�stS|j|jko$|j|jkS)N)rkrFr}rWr�)r[r~rCrCrDr;s
z_TypeAlias.__eq__cCst|j|jf�S)N)r�rWr�)r[rCrCrDr�@sz_TypeAlias.__hash__cCs t|jt�std��t||j�S)Nz<Parameterized type aliases cannot be used with isinstance().)rkr�rrPr�)r[r�rCrCrDr�Csz_TypeAlias.__instancecheck__cCs t|jt�std��t||j�S)Nz<Parameterized type aliases cannot be used with issubclass().)rkr�rrPr�r�)r[rVrCrCrDr�Isz_TypeAlias.__subclasscheck__N)rWr�r�r�)rArdr@rpr^rfr�rr�r�r�rCrCrCrDrF
s	rFcCs0x*|D]"}t|t�st|t�r|j|�qWdS)N)rkrNrHrc)�typesrb�trCrCrDrcPs
rccCsg}t||�t|�S)N)rcrm)r�rbrCrCrD�
_type_varsVs
r�cCs$t|t�st|t�r |j||�S|S)N)rkrNrHra)r�r_r`rCrCrDra\sracCs�|dkrtd�St|t�r"t|�}t|t�r:t|�jdksTt|ttf�rft|�rft|d|f��t|�jdkr�t|dd�s�t|t	�r�|j
ttfkr�td|��|S)N�	_ClassVarz Got %.100r.�_Union�	_Optional�
__origin__z&Plain %s is not valid as type argument)r�r�)
rnrkrlrGrHrA�callablerP�getattrrN�_gorgr
�	_Protocol)rz�msgrCrCrDr|bs
r|cCs`t|t�r:t|t�r:|jdkr(t|�Sd|jt|�fS|dkrFdSt|tj�rX|jSt|�S)N�builtinsz%s.%s.z...)	rkrnrNrdrEr��FunctionTyperA�repr)r�rCrCrDrS�s
rSc@s eZdZfZdd�Zdd�ZdS)�_AnycCstd��dS)Nz%Any cannot be used with isinstance().)rP)r[r�rCrCrDr��sz_Any.__instancecheck__cCstd��dS)Nz%Any cannot be used with issubclass().)rP)r[rVrCrCrDr��sz_Any.__subclasscheck__N)rArdr@rpr�r�rCrCrCrDr��sr�c@s eZdZfZdd�Zdd�ZdS)�	_NoReturncCstd��dS)Nz*NoReturn cannot be used with isinstance().)rP)r[r�rCrCrDr��sz_NoReturn.__instancecheck__cCstd��dS)Nz*NoReturn cannot be used with issubclass().)rP)r[rVrCrCrDr��sz_NoReturn.__subclasscheck__N)rArdr@rpr�r�rCrCrCrDr��s
r�csJeZdZdZdddd��fd	d
�
Zdd�Zd
d�Zdd�Zdd�Z�Z	S)rrA�	__bound__r��
__covariant__�__contravariant__NF)�bound�	covariant�
contravariantcs�t�j|f|�|||d��||_|r2|r2td��t|�|_t|�|_|rZ|dk	rZtd��|rrt|�dkrrtd��d�t	�fdd�|D��|_
|r�t|d	�|_nd|_dS)
N)r�r�r�z"Bivariant types are not supported.z-Constraints cannot be combined with bound=...rKz"A single constraint is not allowedz:TypeVar(name, constraint, ...): constraints must be types.c3s|]}t|��VqdS)N)r|)�.0r�)r�rCrD�	<genexpr>sz#TypeVar.__init__.<locals>.<genexpr>zBound must be a type.)
rTr^rA�
ValueError�boolr�r�rPrjrmr�r|r�)r[rWr�r�r�Zconstraints)rZ)r�rDr^�s 

zTypeVar.__init__cCs||kr|j|�dS)N)�append)r[rbrCrCrDrcszTypeVar._get_type_varscCs&|jrd}n|jrd}nd}||jS)N�+�-�~)r�r�rA)r[�prefixrCrCrDrf
szTypeVar.__repr__cCstd��dS)Nz0Type variables cannot be used with isinstance().)rP)r[�instancerCrCrDr�szTypeVar.__instancecheck__cCstd��dS)Nz0Type variables cannot be used with issubclass().)rP)r[rVrCrCrDr�szTypeVar.__subclasscheck__)rAr�r�r�r�)
rArdr@rpr^rcrfr�r�rhrCrC)rZrDr�s*	�T�KT�VT�T_co)r��V_co�VT_co�T_contra)r�cCsd|dkrg}t|d�r0t|ttf�r0|j||�St|t�r`x$t|�D]\}}||krD||SqDW|S)N�
_subs_tree)�hasattrrkrrHr�r�	enumerate)rzrbr\�iZtvarrCrCrD�_replace_arg)s
r�c	Cs�|jdkr|S|j}g}x|jdk	r6|j|�|j}qWg}x |jD]}|jt|||��qDWx8|D]0}g}x"|jD]}|jt||j|��qtW|}qdW|S)N)r�r��__args__r��__parameters__)	rVrbr\ZcurrentZ
orig_chain�	tree_argsrzZoclsZ
new_tree_argsrCrCrDr�Ds 



r�csg}xn|D]f}t|t�r0|jtkr0|j|j�q
t|t�rft|�dkrf|dtkrf|j|dd��q
|j|�q
Wt	|��t��t|�kr�g}x(|D] }|�kr�|j|��j
|�q�W|}t	|��x>|D]6�t�t�s�q�t�fdd���hD��r̈j
��q�Wt�fdd�|D��S)NrrKc3s6|].}t|t�o|jdk	st|t�o,t�|�VqdS)N)rkrr�rnr�)r�Zt2)�t1rCrDr��s
z'_remove_dups_flatten.<locals>.<genexpr>c3s|]}|�kr|VqdS)NrC)r�r�)�
all_paramsrCrDr��s)
rkr�r�r�extendr�rmrjr��set�removern�any)�
parameters�params�pZ
new_paramsr�rC)r�r�rD�_remove_dups_flattenes.
"



r�cCsX|jstdt|���t|�}t|j�}||krTtd||kr@dndt|�||f��dS)Nz%s is not a generic classz0Too %s parameters for %s; actual %s, expected %sZmanyZfew)r�rPr�rj)rVr�ZalenZelenrCrCrD�_check_generic�s
r�cs4tj����tj�j�tj����fdd��}|S)Ncs*y
�||�Stk
rYnX�||�S)N)rP)r\r])�cached�funcrCrD�inner�s

z_tp_cache.<locals>.inner)�	functools�	lru_cache�	_cleanupsr��cache_clear�wraps)r�r�rC)r�r�rD�	_tp_cache�sr�cs�eZdZdZddd��fdd	�Zd
d�Zdd
�Z�fdd�Z�fdd�Ze	dd��Z
d dd�Zdd�Zdd�Z
dd�Zdd�Z�ZS)!r�r�r�r��
__tree_hash__NF)rOcs�t�j|||f|�d|i�}|dkrHd|_d|_d|_ttd��|_|St|t	�sZt
d��|tkr~t|�}t
|�dkr~|dSt|�|_||_||_|j�}t|t	�r�tt|��|_n
t|�|_|S)NrOrzExpected parameters=<tuple>rKr)r)rTrUr�r�r�r��	frozensetr�rkrmrPrr�rjr�r�)rVr��originrOr\r[Z	subs_tree)rZrCrDrU�s*



z_Union.__new__cs^|jdkr|St��fdd�|jD��}t|j���}||jkrN||jkrN|S|j||dd�S)Nc3s|]}t|���VqdS)N)ra)r�r�)r_r`rCrDr��sz$_Union._eval_type.<locals>.<genexpr>T)rO)r�rmrar�rZ)r[r_r`�ev_args�	ev_originrC)r_r`rDra�s
z_Union._eval_typecCs|jr|jrt|j|�dS)N)r�r�rc)r[rbrCrCrDrcsz_Union._get_type_varscs<|jdkrt�j�S|j�}t|t�s.t|�S|dj|�S)Nr)r�rTrfr�rkrmr��
_tree_repr)r[�tree)rZrCrDrfs


z_Union.__repr__cs`g}xB|dd�D]2}t|t�s0|jt|��q|j|dj|��qWt�j�ddj|�S)NrKrz[%s]z, )rkrmr�rSr�rTrfrQ)r[r��arg_listrz)rZrCrDr�
s
z_Union._tree_reprcsl|fkrtd��t|t�s |f}|jdkr0d�nd�t�fdd�|D��}|tk	r\t||�|j||dd�S)Nz Cannot take a Union of no types.z)Union[arg, ...]: each arg must be a type.z*Parameters to generic types must be types.c3s|]}t|��VqdS)N)r|)r�r�)r�rCrDr� sz%_Union.__getitem__.<locals>.<genexpr>T)r�rO)rPrkrmr�rr�rZ)r[r�rC)r�rDr�s


z_Union.__getitem__cCs>|tkrtSt|||�}t|�}t|�dkr4|dStf|S)NrKr)rr�r�rj)r[rbr\r�rCrCrDr�%sz_Union._subs_treecCs6t|t�r|j|jkS|tk	r*|j�|kS||kSdS)N)rkr�r�rr�)r[r~rCrCrDr.s

z
_Union.__eq__cCs|jS)N)r�)r[rCrCrDr�6sz_Union.__hash__cCstd��dS)Nz(Unions cannot be used with isinstance().)rP)r[r�rCrCrDr�9sz_Union.__instancecheck__cCstd��dS)Nz(Unions cannot be used with issubclass().)rP)r[rVrCrCrDr�<sz_Union.__subclasscheck__)r�r�r�r�)NN)NN)rArdr@rprUrarcrfr�r�r�r�rr�r�r�rhrCrC)rZrDr��s,
	
	r�c@seZdZfZedd��ZdS)r�cCst|d�}t|td�fS)Nz#Optional[t] requires a single type.)r|rrn)r[rzrCrCrDr�Ks
z_Optional.__getitem__N)rArdr@rpr�r�rCrCrCrDr�Csr�cCsJt}x@t|jdd��D]*\}}t|t�r|jtkr|j|d}qW|S)NrK���)�objectr��__mro__rkrr�r
)rVZnext_in_mror��crCrCrD�_next_in_mroTs
r�cs,t�jtj�r�fdd�}n�fdd�}|S)NcsZ�jj|�}|tk	r|S�j|jkr(dSx,�jj�D]}t|t�rDq4t||�r4dSq4WtS)NT)�	__extra__�__subclasshook__r}r��__subclasses__rkrr�)�subclass�res�scls)rVrCrD�
__extrahook__ks

z)_make_subclasshook.<locals>.__extrahook__cs�jrt|�j�rdStS)NT)r�r�r})r�)rVrCrDr�ys)rkr��abc�ABCMeta)rVr�rC)rVrD�_make_subclasshookbsr�cCs2t|�}d|kr.x|dD]}|j|d�qW|S)Nrp)�dict�pop)ZdctZ	dict_copyZslotrCrCrD�_no_slots_copy�s
r�cs�eZdZd �fdd�	Zedd��Zejdd��Zedd��Zejd	d��Zd
d�Zdd
�Z	�fdd�Z
�fdd�Zd!dd�Zdd�Z
dd�Zedd��Z�fdd�Zdd�Z�fdd�Z�ZS)"rNc	sX|dk	r
n�t|�}d}	xF|D]>}
|
tkr0td��t|
t�r|
jtkr|	dk	rTtd��|
j}	qW|	dkrl|}	nPt|�}t|	��|�ks�tddj�fdd�|D��djdd�|	D��f��|	}|}|dk	r�t	|�t
jkr�||kr�|f|}tdd�|D��}t
d	d�|D���r td
d�|D��}|j|||�s2dn|jd��t�j||||dd
�}
tt|
�jd|�sj|
n|j�||
_|�r�tdd�|D��nd|
_t|
�|
_|dk�r�||
_d|k�r�|�s�t|
jdd�dk�r�t|
�|
_t|t
j��r�|j|
_|j|
_n|dk	�r|j|
_|j|
_|�r2t|d��r2|j|
_|�rDt|
j��ntt|
�j �|
_!|
S)Nz!Cannot inherit from plain Genericz0Cannot inherit from Generic[...] multiple types.z6Some type variables (%s) are not listed in Generic[%s]z, c3s|]}|�krt|�VqdS)N)rl)r�r�)�gvarsetrCrDr��sz&GenericMeta.__new__.<locals>.<genexpr>css|]}t|�VqdS)N)rl)r��grCrCrDr��scss"|]}t|t�r|jn|VqdS)N)rkrr�)r��brCrCrDr��scss |]}t|t�o|tk	VqdS)N)rkrr
)r�r�rCrCrDr��scss|]}|tk	r|VqdS)N)r
)r�r�rCrCrDr��s)r�r�r�T)rOr�css*|]"}|tkrdn|tkrfn|VqdS).N)�_TypingEllipsis�_TypingEmpty)r��arCrCrDr��sr�rA�r�r@)"r�r
rPrkrr�r�r�rQrnr�r�rmr��updater�rTrU�__setattr__r�r��__next_in_mro__�__orig_bases__r�r�r��
_abc_registry�
_abc_cacher�r@r�r�r�r�)rVrWrXrYrbr\r��extra�
orig_basesZgvars�baseZtvarsetZ
initial_basesr[)rZ)r�rDrU�sj









zGenericMeta.__new__cCst|jtj�r|jjS|jjS)N)rkr�r�r��_abc_negative_cacher��_abc_generic_negative_cache)r[rCrCrDr��szGenericMeta._abc_negative_cachecCs,|jdkr(t|jtj�r"||j_n||_dS)N)r�rkr�r�r�r�r�)r[�valuerCrCrDr�s

cCst|jtj�r|jjS|jjS)N)rkr�r�r��_abc_negative_cache_versionr��#_abc_generic_negative_cache_version)r[rCrCrDr�	sz'GenericMeta._abc_negative_cache_versioncCs,|jdkr(t|jtj�r"||j_n||_dS)N)r�rkr�r�r�r�r�)r[r�rCrCrDr�s

cCs|jr|jrt|j|�dS)N)r�r�rc)r[rbrCrCrDrcszGenericMeta._get_type_varsc
s�|jr|jj���nd}|jr8t��fdd�|jD��nd}||jkrT||jkrT|S|j|j|jt|j�|rtt	|�nd|||j
|jd�S)Nc3s|]}t|���VqdS)N)ra)r�r�)r_r`rCrDr�sz)GenericMeta._eval_type.<locals>.<genexpr>)rbr\r�r�r�)r�rar�rmrZrA�	__bases__r��__dict__r�r�r�)r[r_r`r�r�rC)r_r`rDras$zGenericMeta._eval_typecs"|jdkrt�j�S|j|j��S)N)r�rTrfr�r�)r[)rZrCrDrf+s

zGenericMeta.__repr__cstg}xV|dd�D]F}|fkr*|jd�qt|t�sD|jt|��q|j|dj|��qWt�j�ddj|�S)NrKz()rz[%s]z, )r�rkrmrSr�rTrfrQ)r[r�r�rz)rZrCrDr�0s
zGenericMeta._tree_reprcCs*|jdkr|St|||�}|jft|�S)N)r�r�r�rm)r[rbr\r�rCrCrDr�;s
zGenericMeta._subs_treecCs6t|t�stS|jdks"|jdkr*||kS|j|jkS)N)rkrr}r�r�)r[r~rCrCrDrAs

zGenericMeta.__eq__cCs|jS)N)r�)r[rCrCrDr�HszGenericMeta.__hash__c
s6t|t�s|f}|r0|jtk	r0tdt|���d�t�fdd�|D��}|tkr�tdd�|D��sltd��tt	|��t|�kr�td��|}|}nb|tt
fkr�t|�}|}nH|tkr�|}|}n6|j
ttfkr�tdt|���nt||�t|�}|}|j
dk�r|fnf}|j|j||jt|j�||||j|jd	�S)
Nz)Parameter list to %s[...] cannot be emptyz*Parameters to generic types must be types.c3s|]}t|��VqdS)N)r|)r�r�)r�rCrDr�Ssz*GenericMeta.__getitem__.<locals>.<genexpr>css|]}t|t�VqdS)N)rkr)r�r�rCrCrDr�Vsz5Parameters to Generic[...] must all be type variablesz-Parameters to Generic[...] must all be uniquez'Cannot subscript already-subscripted %s)rbr\r�r�r�)rkrmr�rrPrEr
�allrjr�rr�r�r�r�r�rZrAr�r�r�r�r�)r[r�rbr\ZprependrC)r�rDr�KsJ

zGenericMeta.__getitem__csJ|jdk	r*tjd�jddkr&td��dS|tkr>td|��t�j|�S)	NrKrAr�r�zCParameterized generics cannot be used with class or instance checksFz5Class %r cannot be used with class or instance checks)r�r�)r�r>�	_getframe�	f_globalsrPr
rTr�)r[rV)rZrCrDr�ys
zGenericMeta.__subclasscheck__cCst|j|�S)N)r�rZ)r[r�rCrCrDr��szGenericMeta.__instancecheck__csT|jd�r|jd�s(|jd�s(|jdkr<tt|�j||�ntt|j�j||�dS)N�__�_abc_)rL�endswithr�rTrr�)r[�attrr�)rZrCrDr��s


zGenericMeta.__setattr__)NNNNN)NN)rArdr@rU�propertyr��setterr�rcrarfr�r�rr�r�r�r�r�r�rhrCrC)rZrDr�s `
.cOs�|jdkr@|jtjkr,|jtjk	r,|j|�S|j|f|�|�Snl|j}|jtjkrj|jtjk	rj|j|�}n|j|f|�|�}y
||_Wntk
r�YnX|j||�|SdS)N)r�rUr�r^r�Z__orig_class__�AttributeError)Zbase_clsrVr\r]r�r�rCrCrD�_generic_new�s 


r
c@seZdZfZdd�ZdS)r
cOs&|jtkrtd��t|j|f|�|�S)NzHType Generic cannot be instantiated; it can be used only as a base class)r�r
rPr
r�)rVr\r]rCrCrDrU�s
zGeneric.__new__N)rArdr@rprUrCrCrCrDr
�s)rqc@seZdZdS)r�N)rArdr@rCrCrCrDr��sr�c@seZdZdS)r�N)rArdr@rCrCrCrDr��sr�cs0eZdZe�fdd��Zdd�Zdd�Z�ZS)�	TupleMetacs�|jdk	s|jtk	r t�j|�S|fkr6t�jtf�St|t�sF|f}t|�dkr�|ddkr�d�t	|d��}t�j|t
f�Sd�t�fdd�|D��}t�j|�S)	NrrK.z Tuple[t, ...]: t must be a type.rz*Tuple[t0, t1, ...]: each t must be a type.c3s|]}t|��VqdS)N)r|)r�r�)r�rCrDr��sz(TupleMeta.__getitem__.<locals>.<genexpr>)r�r�rrTr�r�rkrmrjr|r�)r[r�r�)rZ)r�rDr��s
zTupleMeta.__getitem__cCs |jdkrt|t�Std��dS)Nz5Parameterized Tuple cannot be used with isinstance().)r�rkrmrP)r[r�rCrCrDr��s

zTupleMeta.__instancecheck__cCs |jdkrt|t�Std��dS)Nz5Parameterized Tuple cannot be used with issubclass().)r�r�rmrP)r[rVrCrCrDr��s

zTupleMeta.__subclasscheck__)rArdr@r�r�r�r�rhrCrC)rZrDr�src@seZdZfZdd�ZdS)rcOs$|jtkrtd��tt|f|�|�S)Nz6Type Tuple cannot be instantiated; use tuple() instead)r�rrPr
rm)rVr\r]rCrCrDrUs
z
Tuple.__new__N)rArdr@rprUrCrCrCrDr�s
)r�rqcsDeZdZ�fdd�Z�fdd�Z�fdd�Ze�fdd��Z�ZS)	�CallableMetacs"|jdkrt�j�S|j|j��S)N)r�rTrfr�r�)r[)rZrCrDrfs

zCallableMeta.__repr__cs�|jtk	rt�j|�Sg}xB|dd�D]2}t|t�sF|jt|��q(|j|dj|��q(W|ddkr�t|d�d|dSt|d�ddj	|dd��|dfS)	NrKrz...z	[..., %s]z
[[%s], %s]z, r�r�)
r�rrTr�rkrmr�rSr�rQ)r[r�r�rz)rZrCrDr�s


zCallableMeta._tree_reprcs�|jdk	s|jtk	r t�j|�St|t�s8t|�dkr@td��|\}}|t	krZt	|f}n$t|t
�srtd|f��t|�|f}|j|�S)Nrz6Callable must be used as Callable[[arg, ...], result].z8Callable[args, result]: args must be a list. Got %.100r.)r�r�rrTr�rkrmrjrP�Ellipsis�list�__getitem_inner__)r[r�r\�result)rZrCrDr�*s


zCallableMeta.__getitem__cs^|\}}d�t|��}|tkr.t�jt|f�Sd�t�fdd�|D��}||f}t�j|�S)Nz.Callable[args, result]: result must be a type.z6Callable[[arg, ...], result]: each arg must be a type.c3s|]}t|��VqdS)N)r|)r�rz)r�rCrDr�Fsz1CallableMeta.__getitem_inner__.<locals>.<genexpr>)r|r
rTr�r�rm)r[r�r\r)rZ)r�rDr>s

zCallableMeta.__getitem_inner__)	rArdr@rfr�r�r�rrhrCrC)rZrDrsrc@seZdZfZdd�ZdS)rcOs&|jtkrtd��t|j|f|�|�S)NzIType Callable cannot be instantiated; use a non-abstract subclass instead)r�rrPr
r�)rVr\r]rCrCrDrUXs
zCallable.__new__N)rArdr@rprUrCrCrCrDrKscsJeZdZdZddd�Zdd�Zdd�Z�fd	d
�Zdd�Zd
d�Z	�Z
S)r��__type__NcKs
||_dS)N)r)r[�tpr]rCrCrDr^rsz_ClassVar.__init__cCsPt|�}|jdkr4|t|dj|jdd���dd�Stdj|jdd����dS)Nz{} accepts only single type.rKT)rOz {} cannot be further subscripted)rnrr|�formatrArP)r[�itemrVrCrCrDr�us
z_ClassVar.__getitem__cCs,t|j||�}||jkr|St|�|dd�S)NT)rO)rarrn)r[r_r`Znew_tprCrCrDra~s
z_ClassVar._eval_typecs,t�j�}|jdk	r(|djt|j��7}|S)Nz[{}])rTrfrrrS)r[�r)rZrCrDrf�s

z_ClassVar.__repr__cCstt|�j|jf�S)N)r�rnrAr)r[rCrCrDr��sz_ClassVar.__hash__cCs,t|t�stS|jdk	r$|j|jkS||kS)N)rkr�r}r)r[r~rCrCrDr�s


z_ClassVar.__eq__)r)N)rArdr@rpr^r�rarfr�rrhrCrC)rZrDr�_s
	r�cCs|S)NrC)�typ�valrCrCrDr6�sc
Cs�y
|j}Wntk
riSX|j}|j}|d|�}|jp@f}|j}|rTt|�ni}|t|�}x&t||d�|�D]\}}	|	||<qxW|S)N)	�__code__r	�co_argcount�co_varnames�__defaults__�__kwdefaults__r�rj�zip)
r�r{Z	pos_countZ	arg_names�defaultsZ
kwdefaultsr�Z
pos_offsetrWr�rCrCrD�
_get_defaults�s

rc
Cs�t|dd�riSt|t�r�i}x�t|j�D]z}|dkrFtj|jj}n|}|jj	di�}xJ|j
�D]>\}}|dkrztd�}t|t�r�t|�}t
|||�}|||<qbWq*W|S|dkr�t|tj�r�|j}nt|di�}|dkr�|}n|dkr�|}t|dd�}|dk�r"t|t��riStdj|���t|�}	t|�}xp|j
�D]d\}}|dk�rVtd�}t|t��rjt|�}t
|||�}||	k�r�|	|dk�r�t|}|||<�q<W|S)N�__no_type_check__�__annotations__�__globals__z1{!r} is not a module, class, method, or function.)r�rkrn�reversedr�r>�modulesrdr��get�itemsrlrGrar��
ModuleType�_allowed_typesrPrrr�r)
r�r_r`Zhintsr�Zbase_globalsZannrWr�rrCrCrDr7�sV



cCs�t|t�r||jj�}x0|jj�D]"\}}||j|fkr |j|�q Wx4|j�D](}t|tj	�rfd|_
t|t�rPt|�qPWy
d|_
Wntk
r�YnX|S)NT)
rkrnr��copyr&r�r��valuesr�r�r r9rP)rzZ	arg_attrsrrr�rCrCrDr9s	



cstj���fdd��}|S)Ncs�||�}t|�}|S)N)r9)r\r]r�)�	decoratorrCrD�wrapped_decorator/s
z2no_type_check_decorator.<locals>.wrapped_decorator)r�r�)r+r,rC)r+rDr:(scOstd��dS)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.)�NotImplementedError)r\r]rCrCrD�_overload_dummy8sr.cCstS)N)r.)r�rCrCrDr;Ascs,eZdZ�fdd�Zdd�Zdd�Z�ZS)�
_ProtocolMetacs"t|jkrt�j|�Std��dS)Nz+Protocols cannot be used with isinstance().)r�r�rTr�rP)r[r�)rZrCrDr�es
z_ProtocolMeta.__instancecheck__csL|js
tS|tkrdS|j�}x(|D] �t�fdd�|jD��s$dSq$WdS)NTc3s|]}�|jkVqdS)N)r�)r��d)rrCrDr�wsz2_ProtocolMeta.__subclasscheck__.<locals>.<genexpr>F)rgr}r��_get_protocol_attrsr�r�)r[rV�attrsrC)rrDr�js
z_ProtocolMeta.__subclasscheck__cCs,g}x.|jD]$}t|dd�r|jdkr|j|�qWt�}�x�|D�]�}x�|jj�D]�}x�|jD]&}||k	r`||jkr`t|dd�r`Pq`W|jd�rT|dkrT|dkrT|dkrT|dkrT|dkrT|d	krT|d
krT|dkrT|dkrT|d
krT|dkrT|dkrT|dkrT|dkrT|dkrT|dkrT|j|�qTWqBW|S)NrgFr�r�__abstractmethods__r!rir�r�r�rpr1r�r�r�r�r�r�rd)	r�r�rAr�r�r��keysrL�add)r[Zprotocol_basesr�r2r�rrCrCrDr1{s<z!_ProtocolMeta._get_protocol_attrs)rArdr@r�r�r1rhrCrC)rZrDr/^sr/c@seZdZfZdZdS)r�TN)rArdr@rprgrCrCrCrDr��sr��	Awaitablec@seZdZfZdS)r6N)rArdr@rprCrCrCrDr6�s)r��	Coroutinec@seZdZfZdS)r7N)rArdr@rprCrCrCrDr7�s�
AsyncIterablec@seZdZfZdS)r8N)rArdr@rprCrCrCrDr8�sc@seZdZfZdS)�
AsyncIteratorN)rArdr@rprCrCrCrDr9�sr9c@seZdZfZdS)rN)rArdr@rprCrCrCrDr�sc@seZdZfZdS)rN)rArdr@rprCrCrCrDr�sc@s"eZdZfZeed�dd��ZdS)r*)�returncCsdS)NrC)r[rCrCrD�__int__�szSupportsInt.__int__N)rArdr@rpr�intr;rCrCrCrDr*�sc@s"eZdZfZeed�dd��ZdS)r))r:cCsdS)NrC)r[rCrCrD�	__float__�szSupportsFloat.__float__N)rArdr@rpr�floatr=rCrCrCrDr)�sc@s"eZdZfZeed�dd��ZdS)r()r:cCsdS)NrC)r[rCrCrD�__complex__�szSupportsComplex.__complex__N)rArdr@rpr�complexr?rCrCrCrDr(�sc@s"eZdZfZeed�dd��ZdS)r')r:cCsdS)NrC)r[rCrCrD�	__bytes__�szSupportsBytes.__bytes__N)rArdr@rpr�bytesrArCrCrCrDr'�sc@s"eZdZfZeed�dd��ZdS)r&)r:cCsdS)NrC)r[rCrCrD�__abs__�szSupportsAbs.__abs__N)rArdr@rprr�rCrCrCrCrDr&�sc@s&eZdZfZedeed�dd��ZdS)r+r)�ndigitsr:cCsdS)NrC)r[rDrCrCrD�	__round__szSupportsRound.__round__N)r)rArdr@rprr<r�rErCrCrCrDr+sc@seZdZfZdS)r%N)rArdr@rprCrCrCrDr%
sc@s"eZdZfZedd�dd��ZdS)r%zIterator[T_co])r:cCsdS)NrC)r[rCrCrD�__reversed__szReversible.__reversed__N)rArdr@rprrFrCrCrCrDr%
sc@seZdZfZdS)rN)rArdr@rprCrCrCrDrs�
Collectionc@seZdZfZdS)rGN)rArdr@rprCrCrCrDrGsc@seZdZfZdS)rN)rArdr@rprCrCrCrDr'sc@seZdZfZdS)rN)rArdr@rprCrCrCrDr+sc@seZdZfZdS)r!N)rArdr@rprCrCrCrDr!0sc@seZdZfZdS)rN)rArdr@rprCrCrCrDr6sc@seZdZfZdS)rN)rArdr@rprCrCrCrDr:sc@seZdZfZdS)rN)rArdr@rprCrCrCrDr?sc@seZdZfZdS)r"N)rArdr@rprCrCrCrDr"Esc@seZdZfZdS)r"N)rArdr@rprCrCrCrDr"Isc@seZdZfZdS)r"N)rArdr@rprCrCrCrDr"Msc@seZdZfZdS)r N)rArdr@rprCrCrCrDr Rsc@seZdZfZdS)rN)rArdr@rprCrCrCrDrVsc@seZdZfZdd�ZdS)r0cOs$|jtkrtd��tt|f|�|�S)Nz4Type List cannot be instantiated; use list() instead)r�r0rPr
r)rVr\r]rCrCrDrU^s
zList.__new__N)rArdr@rprUrCrCrCrDr0Zsc@seZdZfZdd�ZdS)r-cOs*|jtkrtj||�Sttj|f|�|�S)N)r�r-�collections�dequer
)rVr\r]rCrCrDrUis
z
Deque.__new__N)rArdr@rprUrCrCrCrDr-esc@seZdZfZdd�ZdS)r1cOs$|jtkrtd��tt|f|�|�S)Nz2Type Set cannot be instantiated; use set() instead)r�r1rPr
r�)rVr\r]rCrCrDrUss
zSet.__new__N)rArdr@rprUrCrCrCrDr1osc@seZdZfZdd�ZdS)r2cOs$|jtkrtd��tt|f|�|�S)Nz>Type FrozenSet cannot be instantiated; use frozenset() instead)r�r2rPr
r�)rVr\r]rCrCrDrU}s
zFrozenSet.__new__N)rArdr@rprUrCrCrCrDr2zsc@seZdZfZdS)rN)rArdr@rprCrCrCrDr�sc@seZdZfZdS)rN)rArdr@rprCrCrCrDr�sc@seZdZfZdS)rN)rArdr@rprCrCrCrDr�sc@seZdZfZdS)r$N)rArdr@rprCrCrCrDr$�s�AbstractContextManagerc@seZdZfZdS)rN)rArdr@rprCrCrCrDr�sc@s2eZdZfZdd�Zejdd��Zedd��Z	dS)rcCs|S)NrC)r[rCrCrD�	__enter__�szContextManager.__enter__cCsdS)NrC)r[�exc_type�	exc_value�	tracebackrCrCrD�__exit__�szContextManager.__exit__cCs8|tkr4tdd�|jD��r4tdd�|jD��r4dStS)Ncss|]}d|jkVqdS)rKN)r�)r��BrCrCrDr��sz2ContextManager.__subclasshook__.<locals>.<genexpr>css|]}d|jkVqdS)rON)r�)r�rPrCrCrDr��sT)rr�r�r})rV�CrCrCrDr��s
zContextManager.__subclasshook__N)
rArdr@rprKr�rrO�classmethodr�rCrCrCrDr�s�AbstractAsyncContextManagerc@seZdZfZdS)�AsyncContextManagerN)rArdr@rprCrCrCrDrT�srT�a�
class AsyncContextManager(Generic[T_co]):
    __slots__ = ()

    async def __aenter__(self):
        return self

    @abc.abstractmethod
    async def __aexit__(self, exc_type, exc_value, traceback):
        return None

    @classmethod
    def __subclasshook__(cls, C):
        if cls is AsyncContextManager:
            if sys.version_info[:2] >= (3, 6):
                return _collections_abc._check_methods(C, "__aenter__", "__aexit__")
            if (any("__aenter__" in B.__dict__ for B in C.__mro__) and
                    any("__aexit__" in B.__dict__ for B in C.__mro__)):
                return True
        return NotImplemented

__all__.append('AsyncContextManager')
c@seZdZfZdd�ZdS)r.cOs$|jtkrtd��tt|f|�|�S)Nz4Type Dict cannot be instantiated; use dict() instead)r�r.rPr
r�)rVr\r]rCrCrDrU�s
zDict.__new__N)rArdr@rprUrCrCrCrDr.�sc@seZdZfZdd�ZdS)r/cOs*|jtkrtj||�Sttj|f|�|�S)N)r�r/rH�defaultdictr
)rVr\r]rCrCrDrU�s
zDefaultDict.__new__N)rArdr@rprUrCrCrCrDr/�sc@seZdZfZdd�ZdS)r,cOs*|jtkrtj||�Sttj|f|�|�S)N)r�r,rHr
)rVr\r]rCrCrDrU�s
zCounter.__new__N)rArdr@rprUrCrCrCrDr,�s�ChainMapc@seZdZfZdd�ZdS)rWcOs*|jtkrtj||�Sttj|f|�|�S)N)r�rWrHr
)rVr\r]rCrCrDrU�s
zChainMap.__new__N)rArdr@rprUrCrCrCrDrW�sc@seZdZfZdd�ZdS)r4cOs$|jtkrtd��tt|f|�|�S)Nz@Type Generator cannot be instantiated; create a subclass instead)r�r4rPr
�_G_base)rVr\r]rCrCrDrUs
zGenerator.__new__N)rArdr@rprUrCrCrCrDr4s�AsyncGeneratorc@seZdZfZdS)rYN)rArdr@rprCrCrCrDrYs�CT_co)r�r�c@seZdZfZdS)rN)rArdr@rprCrCrCrDr$scsvd��fdd�|D�}tj|dd�|D��}tj|�|_|_ytjd�jjdd�|_	Wnt
tfk
rpYnX|S)NzDNamedTuple('Name', [(f0, t0), (f1, t1), ...]); each t must be a typecsg|]\}}|t|��f�qSrC)r|)r��nr�)r�rCrD�
<listcomp>Asz!_make_nmtuple.<locals>.<listcomp>cSsg|]\}}|�qSrCrC)r�r[r�rCrCrDr\BsrrA�__main__)rH�
namedtuple�OrderedDictr!�_field_typesr>rrr%rdr	r�)rWr��nm_tplrC)r�rD�
_make_nmtuple?srbrUr^rp�__getnewargs__�_fields�_field_defaultsr`�_make�_replace�_asdict�_sourcerdrAr@r!cseZdZ�fdd�Z�ZS)�NamedTupleMetacs|jdd�rt�j||||�Sts*td��|jdi�}t||j��}g}i}xP|D]H}||krz||}	|j|	�|	||<qR|rRtdj|dj	|j
��d���qRWtj|�|j_
t|�|j_||_xD|D]<}
|
tkr�td|
��q�|
tko�|
|jkr�t||
||
�q�W|S)	NrOFz<Class syntax for NamedTuple is only supported in Python 3.6+r!zXNon-default namedtuple field {field_name} cannot follow default field(s) {default_names}z, )�
field_nameZ
default_namesz&Cannot overwrite NamedTuple attribute )r%rTrU�_PY36rPrbr&r�rrQr4rHr_r!rmrre�_prohibitedr	�_specialrd�setattr)rV�typenamerX�nsr�rarZ
defaults_dictrkZ
default_value�key)rZrCrDrUYs4



zNamedTupleMeta.__new__)rArdr@rUrhrCrC)rZrDrjWsrjc@seZdZdZddd�ZdS)r3TNcKs:|rtrtd��|dkr$|j�}n|r0td��t||�S)Nz>Keyword syntax for NamedTuple is only supported in Python 3.6+zIEither list of fields or keywords can be provided to NamedTuple, not both)rlrPr&rb)r[rpZfields�kwargsrCrCrDrU�s

zNamedTuple.__new__)N)rArdr@rOrUrCrCrCrDr3yscCsdd�}||_||_|S)NcSs|S)NrC)rBrCrCrD�new_type�szNewType.<locals>.new_type)rAZ
__supertype__)rWrrtrCrCrDr8�sFc@s�eZdZfZeed�dd��Zeed�dd��Zedd�dd��Z	ee
d�d	d
��Zeed�dd��Z
edd�d
d��Zee
d�dd��Zed6eed�dd��Zee
d�dd��Zed8eed�dd��Zed:eeed�dd��Zed;eeed�dd ��Zee
d�d!d"��Zeed�d#d$��Zed<eed%�d&d'��Zee
d�d(d)��Zeeed*�d+d,��Zeeedd-�d.d/��Zed0d�d1d2��Zedd�d3d4��ZdS)=�IO)r:cCsdS)NrC)r[rCrCrD�mode�szIO.modecCsdS)NrC)r[rCrCrDrW�szIO.nameNcCsdS)NrC)r[rCrCrD�close�szIO.closecCsdS)NrC)r[rCrCrD�closed�sz	IO.closedcCsdS)NrC)r[rCrCrD�fileno�sz	IO.filenocCsdS)NrC)r[rCrCrD�flush�szIO.flushcCsdS)NrC)r[rCrCrD�isatty�sz	IO.isattyrK)r[r:cCsdS)NrC)r[r[rCrCrD�read�szIO.readcCsdS)NrC)r[rCrCrD�readable�szIO.readable)�limitr:cCsdS)NrC)r[r~rCrCrD�readline�szIO.readline)�hintr:cCsdS)NrC)r[r�rCrCrD�	readlines�szIO.readlinesr)�offset�whencer:cCsdS)NrC)r[r�r�rCrCrD�seek�szIO.seekcCsdS)NrC)r[rCrCrD�seekable	szIO.seekablecCsdS)NrC)r[rCrCrD�tell	szIO.tell)�sizer:cCsdS)NrC)r[r�rCrCrD�truncate	szIO.truncatecCsdS)NrC)r[rCrCrD�writable	szIO.writable)�sr:cCsdS)NrC)r[r�rCrCrD�write	szIO.write)�linesr:cCsdS)NrC)r[r�rCrCrD�
writelines	sz
IO.writelinesz
IO[AnyStr]cCsdS)NrC)r[rCrCrDrK	szIO.__enter__cCsdS)NrC)r[rnr�rNrCrCrDrO	szIO.__exit__r�)r�r�)r�r�)r�)r)N)rArdr@rprrlrvrWrrwr�rxr<ryrzr{r5r|r}rr0r�r�r�r�r�r�r�r�rKrOrCrCrCrDru�sR
ruc@s>eZdZfZeeeefed�dd��Z	edd�dd��Z
dS)�BinaryIO)r�r:cCsdS)NrC)r[r�rCrCrDr�)	szBinaryIO.write)r:cCsdS)NrC)r[rCrCrDrK-	szBinaryIO.__enter__N)rArdr@rprrrB�	bytearrayr<r�rKrCrCrCrDr�$	s
r�c@s�eZdZfZeed�dd��Zeed�dd��Zee	ed�dd��Z
eed�dd	��Zee
d�d
d��Zedd�dd
��ZdS)�TextIO)r:cCsdS)NrC)r[rCrCrD�buffer7	sz
TextIO.buffercCsdS)NrC)r[rCrCrD�encoding;	szTextIO.encodingcCsdS)NrC)r[rCrCrD�errors?	sz
TextIO.errorscCsdS)NrC)r[rCrCrD�line_bufferingC	szTextIO.line_bufferingcCsdS)NrC)r[rCrCrD�newlinesG	szTextIO.newlinescCsdS)NrC)r[rCrCrDrKK	szTextIO.__enter__N)rArdr@rprr�r�rlr�rr�r�r�r
r�rrKrCrCrCrDr�2	sr�c@s"eZdZdddgZeZeZeZdS)�iorur�r�N)rArdr@�__all__rur�r�rCrCrCrDr�P	s
r�z.io�Patternr�cCs|jS)N)�pattern)r�rCrCrD�<lambda>^	sr��MatchcCs|jjS)N)�rer�)�mrCrCrDr�`	sc@seZdZddgZeZeZdS)r�r�r�N)rArdr@r�r�r�rCrCrCrDr�c	sr�z.re)rr)NN)NN)rrU)rr)rUr^rprcrdrer`rfrgrhri)rdrAr@r!)�r�rrrH�
contextlibr�r�Z	stdlib_rer>r��collections.abcZcollections_abc�ImportErrorr?�_collections_abcrrr	rnr�r^�__str__rlrQr�rErMrNrHrIrGrFrcr�rar|rSr�r
r�ZNoReturnrr�r�r�r�r�r�r�rBr5r�r�r�r�r�r�r�rr�rr�r�r�r�rr
r
r�r�rrmrrrr�rr6rr��BuiltinFunctionType�
MethodTyper'r(r7r9r:r.r;r/r�rr�r6r�r7r8r9rrr*r)r(r'r&r+r%r#rrGr1rr!rrr"r r<rrr0rIr-r�r�r2rrrr$rJrrSrT�execr�r.rVr/r,rWr4rX�
GeneratorTyperYrZrrbrlrmrnrjr3r8r<r=rur�r�r�rAr$rxr��matchr�rCrCrCrD�<module>s�
*%5C

W
!)

"96


R	D








"









"





"(`	





?>