One Hat Cyber Team
Your IP :
3.135.222.112
Server IP :
103.133.214.160
Server :
Linux venus.ewebguru.net 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
Apache/2
PHP Version :
8.1.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib64
/
python3.6
/
__pycache__
/
View File Name :
typing.cpython-36.pyc
3 � \�9��������������D���@���s���d�dl�Z�d�dl�mZmZ�d�dlZd�dlZd�dlZd�dlZd�dlZd�dl Z yd�dl j�ZW�n�ek rr���d�dlZY�nX�ej dd��d�kr�d�dlZyd�dl mZmZmZ�W�n4�ek r����eej�Zee��j�Zeej�ZY�nX�ddd d ddd ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:g4Zd;d<��Zd=d>��ZG�d?d@��d@e�ZG�dAdB��dBedCdD�ZG�dEdF��dFedCdG�ZG�dHdI��dIedCdG�ZG�dJdK��dKedCdG�ZdLdM��Z dNdO��Z!dPdQ��Z"dRdS��Z#dTdU��Z$G�dVdW��dWedCdG�Z%e%dCdG�Z&G�dXdY��dYedCdG�Z'e'dCdG�Z(G�dZd��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��Z6g�Z7dldm��Z8G�dndo��doedCdG�Z9e9dCdG�Z:G�dpdq��dqedCdG�Z;e;dCdG�Z<drds��Z=dtdu��Z>dvdw��Z?G�dxd��dee�j@�ZAdZBdydz��ZCG�d{d ��d eAd|�ZBG�d}d~��d~�ZDG�dd���d��ZEG�d�d���d�eA�ZFG�d�d��deGeGeFd��ZHG�d�d���d�eA�ZIG�d�d��dejJeId��ZJG�d�d���d�edCdG�ZKeKdCdG�ZLd�d3��ZMd�d���ZNe jOe jPe jQe jReeefZSd�d�d4�ZTd�d6��ZUd�d7��ZVd�d���ZWd�d8��ZXG�d�d���d�eA�ZYG�d�d���d�eYd|�ZZej[Z[e\ed���rjG�d�d���d�eBe-�ej]d��Z]ej^d���e\ed���r�G�d�d���d�e]e.�eBe-e0e.f�ej_d��Z_ej^d���e\ed���r�G�d�d���d�eBe-�ej`d��Z`G�d�d���d�e`e-�ejad��Zaej^d���ej^d���G�d�d��deBe-�ejbd��ZbG�d�d��debe-�ejcd��ZcG�d�d'��d'eZ�ZdG�d�d&��d&eZ�ZeG�d�d%��d%eZ�ZfG�d�d$��d$eZ�ZgG�d�d#��d#eZe-��ZhG�d�d(��d(eZe-��Zie\ed"��r�G�d�d"��d"ebe-�ejjd��ZjnG�d�d"��d"eZe-��ZjejkZkG�d�d��deBe-�ejld��Zle\ed���r*G�d�d���d�ekebe-�ele-�ejmd��Zmej^d���e\ed���rRG�d�d��deme-�ejnd��Zon"G�d�d��dekebe-�ele-�ejnd��ZoG�d�d��deoe*�ejpd��Zpe\ed���r�G�d�d��deme+�eBe+e/f�ejqd��Zqn,G�d�d��dekebe+�ele+�eBe+e/f�ejqd��ZqG�d�d��deqe+e,f�ejrd��Zre\ed"��rhe\ed���rDG�d�d��deje-�eme-�ejsd��Zsn"G�d�d��dekeje-�ele-�ejsd��Zsn"G�d�d��dekebe-�ele-�ejsd��ZsG�d�d��dese*�ejtd��ZtG�d�d��deseu�ejvd��ZvG�d�d-��d-ewete*�ewd��ZxG�d�d*��d*ejyete*�ejyd��ZzG�d�d.��d.e{epe*�e{d��ZnG�d�d/��d/e|eoe-�e|d��Z}G�d�d��dekebe-�ej~d��Z~G�d�d��de~e+�eoe+�ejd��ZG�d�d��de~eHe+e/f��eoeHe+e/f��eBe+e/f�ej�d��Z�G�d�d!��d!e~e/�ej�d��Z�e\ed���r�G�d�d��deBe-�ej�d��Z�nG�d�d��deBe-��Z�e\edÃ� r(G�d�dń�d�eBe-�ej�d��Z�ej^dŃ�nej dd��d�k� rDe�dǃ�G�d�d+��d+e�ere+e,f�e�d��Z�G�d�d,��d,ej�ere+e,f�ej�d��Z�G�d�d)��d)ej�e�e*euf�ej�d��Z�e\ed˃� r�ej^d˃�G�d�d˄�d�ej�ere+e,f�ej�d��Z�e\ed1�� r�ej�Z�ne j�Z�G�d�d1��d1ece-�eBe-e0e.f�e�d��Z�e\ed� rVG�d�d΄�d�eae-�eBe-e0f�ej�d��Z�ej^d�e)d�dCedэZ�G�d�d ��d eBe��ed��Z�d�dԄ�Z�ej dd��d�kZ��d�Z��dZ�G�d�d��d�e�Z�G�d�d0��d0e�d|�Z�d�d5��Z�eZ�d�Z�G�d�d��d�eBe2��Z�G�d�d��d�e�e1��Z�G�d�d��d�e�e��Z�G�d�d��d�Z�e�d��e�_�e�ej�e�j�<�ed�e2eej�d��d�d����Z�ed�e2eej�d�d��d�d����Z�G�d�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_CHECKINGc�������������C���s"���t�jd�d��dkr|�jS�|�jS�d�S�)Nr���r���)r���r���)�sys�version_info�__qualname__�__name__)�x��rC����/usr/lib64/python3.6/typing.py� _qualnameg���s����rE���c�������������C���s&���d}|�j�d�r"|�|kr"|�dd���}�|�S�)N� _TypeAlias�_ForwardRef�_TypingBase�_FinalTypingBase�_����)rF���rG���rH���rI���)� startswith)ZnmZ whitelistrC���rC���rD���� _trim_nameo���s����rM���c�������������������sJ���e�Zd�ZdZdZdd���fdd� Zdd��Zdd ��Zd d��Zdd ��Z ���Z S�)� TypingMetaa���Metaclass for most types defined in typing module (not a part of public API). This overrides __new__() to require an extra keyword parameter '_root', which serves as a guard against naive subclassing of the typing classes. Any legitimate class defined using a metaclass derived from TypingMeta must pass _root=True. This also defines a dummy constructor (all the work for most typing constructs is done in __new__) and a nicer repr(). F)�_rootc���������������s2���|s t�ddjtt|��pd���t��j|�|||�S�)NzCannot subclass %sz, z())� TypeError�join�map� _type_repr�super�__new__)�cls�name�bases� namespacerO���)� __class__rC���rD���rU�������s����zTypingMeta.__new__c�������������O���s���d�S�)NrC���)�self�args�kwdsrC���rC���rD����__init__����s����zTypingMeta.__init__c�������������C���s���|�S�)a'��Override this in subclasses to interpret forward references. For example, List['C'] is internally stored as List[_ForwardRef('C')], which should evaluate to List[C], where C is an object found in globalns or localns (searching localns first, of course). rC���)r[����globalns�localnsrC���rC���rD���� _eval_type����s����zTypingMeta._eval_typec�������������C���s���d�S�)NrC���)r[����tvarsrC���rC���rD����_get_type_vars����s����zTypingMeta._get_type_varsc�������������C���s���t�t|���}d|�j|f�S�)Nz%s.%s)rM���rE���� __module__)r[����qnamerC���rC���rD����__repr__����s����zTypingMeta.__repr__)rA���rd���r@����__doc__�_is_protocolrU���r^���ra���rc���rf���� __classcell__rC���rC���)rZ���rD���rN���v���s��� rN���c�������������������sL���e�Zd�ZdZdZdd��Z��fdd�Zdd��Zd d ��Zdd��Z d d��Z ���ZS�)rH���z0Internal indicator of special typing constructs.�__weakref__c�������������O���s���d�S�)NrC���)r[���r\���r]���rC���rC���rD���r^�������s����z_TypingBase.__init__c����������������s@���t�|�dkr4t|d�t�r4t|d�t�r4td|����t��j|��S�)z�Constructor. This only exists to give a better error message in case someone tries to subclass a special typing object (not a good idea). r���r���rK���zCannot subclass %r)�len� isinstance�str�tuplerP���rT���rU���)rV���r\���r]���)rZ���rC���rD���rU�������s ����z_TypingBase.__new__c�������������C���s���|�S�)NrC���)r[���r_���r`���rC���rC���rD���ra�������s����z_TypingBase._eval_typec�������������C���s���d�S�)NrC���)r[���rb���rC���rC���rD���rc�������s����z_TypingBase._get_type_varsc�������������C���s"���t�|��}tt|��}d|j|f�S�)Nz%s.%s)�typerM���rE���rd���)r[���rV���re���rC���rC���rD���rf�������s����z_TypingBase.__repr__c�������������O���s���t�dt|�����d�S�)NzCannot instantiate %r)rP���ro���)r[���r\���r]���rC���rC���rD����__call__����s����z_TypingBase.__call__)rj���)rA���rd���r@���rg���� __slots__r^���rU���ra���rc���rf���rp���ri���rC���rC���)rZ���rD���rH�������s���rH���T)� metaclassrO���c�������������������s2���e�Zd�ZdZf�Zdd���fdd� Zdd��Z���ZS�)rI���z�Internal mix-in class to prevent instantiation. Prevents instantiation unless _root=True is given in class call. It is used to create pseudo-singleton instances Any, Union, Optional, etc. F)rO���c���������������s0���t���j|�f|�|�}|dkr |S�td|����d�S�)NTzCannot instantiate %r)rT���rU���rP���)rV���rO���r\���r]���r[���)rZ���rC���rD���rU�������s����z_FinalTypingBase.__new__c�������������C���s���t�t|��j�S�)N)rM���ro���rA���)r[���rC���rC���rD���� __reduce__����s����z_FinalTypingBase.__reduce__)rA���rd���r@���rg���rq���rU���rs���ri���rC���rC���)rZ���rD���rI�������s���rI���)rO���c�������������������sT���e�Zd�ZdZdZ��fdd�Zdd ��Zd d��Zdd ��Zdd��Z dd��Z dd��Z���ZS�)rG���z-Internal wrapper to hold a forward reference.�__forward_arg__�__forward_code__�__forward_evaluated__�__forward_value__c����������������st���t���j|��t|t�s$td|f���yt|dd�}W�n"�tk rV���td|f���Y�nX�||�_||�_d|�_ d�|�_ d�S�)Nz,Forward reference must be a string -- got %rz<string>�evalz1Forward reference must be an expression -- got %rF)rT���r^���rl���rm���rP����compile�SyntaxErrorrt���ru���rv���rw���)r[����arg�code)rZ���rC���rD���r^�������s���� z_ForwardRef.__init__c�������������C���sf���|�j��s||k r`|d�kr*|d�kr*i��}}n|d�kr8|}n|d�krD|}tt|�j||�d�|�_d|�_�|�jS�)Nz*Forward references must evaluate to types.T)rv����_type_checkrx���ru���rw���)r[���r_���r`���rC���rC���rD���ra�������s���� z_ForwardRef._eval_typec�������������C���s&���t�|t�stS�|�j|jko$|�j|jkS�)N)rl���rG����NotImplementedrt���rw���)r[����otherrC���rC���rD����__eq__����s���� z_ForwardRef.__eq__c�������������C���s���t�|�j|�jf�S�)N)�hashrt���rw���)r[���rC���rC���rD����__hash__���s����z_ForwardRef.__hash__c�������������C���s���t�d��d�S�)Nz4Forward references cannot be used with isinstance().)rP���)r[����objrC���rC���rD����__instancecheck__��s����z_ForwardRef.__instancecheck__c�������������C���s���t�d��d�S�)Nz4Forward references cannot be used with issubclass().)rP���)r[���rV���rC���rC���rD����__subclasscheck__��s����z_ForwardRef.__subclasscheck__c�������������C���s���d|�j�f�S�)Nz_ForwardRef(%r))rt���)r[���rC���rC���rD���rf��� ��s����z_ForwardRef.__repr__)rt���ru���rv���rw���) rA���rd���r@���rg���rq���r^���ra���r����r����r����r����rf���ri���rC���rC���)rZ���rD���rG�������s����rG���c���������������@���sL���e�Zd�ZdZdZdd��Zdd ��Zd d��Zdd ��Zdd��Z dd��Z dd��ZdS�)rF���a:��Internal helper class for defining generic variants of concrete types. Note that this is not a type; let's call it a pseudo-type. It cannot be used in instance and subclass checks in parameterized form, i.e. ``isinstance(42, Match[str])`` raises ``TypeError`` instead of returning ``False``. rW����type_var� impl_type�type_checkerc�������������C���sz���t�|t�stt|���t�|t�s,tt|���t�|t��sDtt|���t�|ttf�s^tt|���||�_||�_||�_ ||�_ dS�)at��Initializer. Args: name: The name, e.g. 'Pattern'. type_var: The type parameter, e.g. AnyStr, or the specific type, e.g. str. impl_type: The implementation type. type_checker: Function that takes an impl_type instance. and returns a value that should be a type_var instance. N)rl���rm����AssertionError�reprro���rN���rH���rW���r����r����r����)r[���rW���r����r����r����rC���rC���rD���r^�����s����z_TypeAlias.__init__c�������������C���s���d|�j�t|�j�f�S�)Nz%s[%s])rW���rS���r����)r[���rC���rC���rD���rf���,��s����z_TypeAlias.__repr__c�������������C���s����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.)rl���r����r���rP����__constraints__ro���� issubclassrZ���rW���r����r����)r[���Z parameterrC���rC���rD����__getitem__/��s���� z_TypeAlias.__getitem__c�������������C���s&���t�|t�stS�|�j|jko$|�j|jkS�)N)rl���rF���r~���rW���r����)r[���r���rC���rC���rD���r����;��s���� z_TypeAlias.__eq__c�������������C���s���t�|�j|�jf�S�)N)r����rW���r����)r[���rC���rC���rD���r����@��s����z_TypeAlias.__hash__c�������������C���s ���t�|�jt�std��t�||�j�S�)Nz<Parameterized type aliases cannot be used with isinstance().)rl���r����r���rP���r����)r[���r����rC���rC���rD���r����C��s����z_TypeAlias.__instancecheck__c�������������C���s ���t�|�jt�std��t||�j�S�)Nz<Parameterized type aliases cannot be used with issubclass().)rl���r����r���rP���r����r����)r[���rV���rC���rC���rD���r����I��s����z_TypeAlias.__subclasscheck__N)rW���r����r����r����)rA���rd���r@���rg���rq���r^���rf���r����r����r����r����r����rC���rC���rC���rD���rF��� ��s���rF���c�������������C���s0���x*|�D�]"}t�|t�st�|t�r|j|��qW�d�S�)N)rl���rN���rH���rc���)�typesrb����trC���rC���rD���rc���P��s���� rc���c�������������C���s���g�}t�|�|��t|�S�)N)rc���rn���)r����rb���rC���rC���rD���� _type_varsV��s���� r����c�������������C���s$���t�|�t�st�|�t�r |�j||�S�|�S�)N)rl���rN���rH���ra���)r����r_���r`���rC���rC���rD���ra���\��s����ra���c�������������C���s����|�dkrt�d�S�t|�t�r"t|��}�t|�t�r:t�|��jdksTt|�t�tf��rft|���rft|d|�f����t�|��jdkr�t|�dd��s�t|�t �r�|�j ttfkr�td|����|�S�) a���Check that the argument is a type, and return it (internal helper). As a special case, accept None and return type(None) instead. Also, _TypeAlias instances (e.g. Match, Pattern) are acceptable. The msg argument is a human-readable error message, e.g. "Union[arg, ...]: arg should be a type." We append the repr() of the actual value (truncated to 100 chars). N� _ClassVarz Got %.100r.�_Union� _Optional� __origin__z&Plain %s is not valid as type argument)r����r����) ro���rl���rm���rG���rH���rA����callablerP����getattrrN����_gorgr ���� _Protocol)r{����msgrC���rC���rD���r}���b��s���� r}���c�������������C���s`���t�|�t�r:t�|�t��r:|�jdkr(t|��S�d|�jt|��f�S�|�dkrFdS�t�|�tj�rX|�jS�t|��S�)a;��Return the repr() of an object, special-casing types (internal helper). If obj is a type, we return a shorter version than the default type.__repr__, based on the module and qualified name, which is typically enough to uniquely identify a type. For everything else, we fall back on repr(obj). �builtinsz%s.%s.z...) rl���ro���rN���rd���rE���r�����FunctionTyperA���r����)r����rC���rC���rD���rS������s���� rS���c���������������@���s$���e�Zd�ZdZf�Zdd��Zdd��ZdS�)�_Anya`��Special type indicating an unconstrained type. - Any is compatible with every type. - Any assumed to have all methods. - All values assumed to be instances of Any. Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance or class checks. c�������������C���s���t�d��d�S�)Nz%Any cannot be used with isinstance().)rP���)r[���r����rC���rC���rD���r�������s����z_Any.__instancecheck__c�������������C���s���t�d��d�S�)Nz%Any cannot be used with issubclass().)rP���)r[���rV���rC���rC���rD���r�������s����z_Any.__subclasscheck__N)rA���rd���r@���rg���rq���r����r����rC���rC���rC���rD���r�������s��� r����c���������������@���s$���e�Zd�ZdZf�Zdd��Zdd��ZdS�)� _NoReturna��Special type indicating functions that never return. Example:: from typing import NoReturn def stop() -> NoReturn: raise Exception('no way') This type is invalid in other positions, e.g., ``List[NoReturn]`` will fail in static type checkers. c�������������C���s���t�d��d�S�)Nz*NoReturn cannot be used with isinstance().)rP���)r[���r����rC���rC���rD���r�������s����z_NoReturn.__instancecheck__c�������������C���s���t�d��d�S�)Nz*NoReturn cannot be used with issubclass().)rP���)r[���rV���rC���rC���rD���r�������s����z_NoReturn.__subclasscheck__N)rA���rd���r@���rg���rq���r����r����rC���rC���rC���rD���r�������s���r����c�������������������sN���e�Zd�ZdZdZdddd ���fd d� Zdd ��Zdd��Zdd��Zdd��Z ���Z S�)r���a���Type variable. Usage:: T = TypeVar('T') # Can be anything A = TypeVar('A', str, bytes) # Must be str or bytes Type variables exist primarily for the benefit of static type checkers. They serve as the parameters for generic types as well as for generic function definitions. See class Generic for more information on generic types. Generic functions work as follows: def repeat(x: T, n: int) -> List[T]: '''Return a list containing n references to x.''' return [x]*n def longest(x: A, y: A) -> A: '''Return the longest of two strings.''' return x if len(x) >= len(y) else y The latter example's signature is essentially the overloading of (str, str) -> str and (bytes, bytes) -> bytes. Also note that if the arguments are instances of some subclass of str, the return type is still plain str. At runtime, isinstance(x, T) and issubclass(C, T) will raise TypeError. Type variables defined with covariant=True or contravariant=True can be used do declare covariant or contravariant generic types. See PEP 484 for more details. By default generic types are invariant in all type variables. Type variables can be introspected. e.g.: T.__name__ == 'T' T.__constraints__ == () T.__covariant__ == False T.__contravariant__ = False A.__constraints__ == (str, bytes) rA���� __bound__r����� __covariant__�__contravariant__NF)�bound� covariant� contravariantc���������������s����t���j|f|�|||d���||�_|r2|r2td��t|�|�_t|�|�_|rZ|d�k rZtd��|rrt|�dkrrtd��d��t ��fdd�|D���|�_ |r�t|d �|�_nd�|�_d�S�) N)r����r����r����z"Bivariant types are not supported.z-Constraints cannot be combined with bound=...rK���z"A single constraint is not allowedz:TypeVar(name, constraint, ...): constraints must be types.c�������������3���s���|�]}t�|���V��qd�S�)N)r}���)�.0r����)r����rC���rD���� <genexpr>���s����z#TypeVar.__init__.<locals>.<genexpr>zBound must be a type.) rT���r^���rA���� ValueError�boolr����r����rP���rk���rn���r����r}���r����)r[���rW���r����r����r����Zconstraints)rZ���)r����rD���r^������s ���� zTypeVar.__init__c�������������C���s���|�|kr|j�|���d�S�)N)�append)r[���rb���rC���rC���rD���rc�����s����zTypeVar._get_type_varsc�������������C���s&���|�j�rd}n|�jrd}nd}||�j�S�)N�+�-�~)r����r����rA���)r[����prefixrC���rC���rD���rf��� ��s����zTypeVar.__repr__c�������������C���s���t�d��d�S�)Nz0Type variables cannot be used with isinstance().)rP���)r[����instancerC���rC���rD���r������s����zTypeVar.__instancecheck__c�������������C���s���t�d��d�S�)Nz0Type variables cannot be used with issubclass().)rP���)r[���rV���rC���rC���rD���r������s����zTypeVar.__subclasscheck__)rA���r����r����r����r����)rA���rd���r@���rg���rq���r^���rc���rf���r����r����ri���rC���rC���)rZ���rD���r������s���(� �T�KT�VT�T_co)r�����V_co�VT_co�T_contra)r����c�������������C���sd���|dkrg�}t�|�d�r0t|�ttf�r0|�j||�S�t|�t�r`x$t|�D�]\}}|�|krD||�S�qDW�|�S�)z�An internal helper function: replace arg if it is a type variable found in tvars with corresponding substitution from args or with corresponding substitution sub-tree if arg is a generic type. N� _subs_tree)�hasattrrl���r���rH���r����r���� enumerate)r{���rb���r\����iZtvarrC���rC���rD����_replace_arg)��s���� r����c������� ������C���s����|�j�dkr|�S�|�j�}g�}x|j�dk r6|j|��|j�}qW�g�}x |�jD�]}|jt|||���qDW�x8|D�]0}g�}x"|jD�]}|jt||j|���qtW�|}qdW�|S�)a���An internal helper function: calculate substitution tree for generic cls after replacing its type parameters with substitutions in tvars -> args (if any). Repeat the same following __origin__'s. Return a list of arguments with all possible substitutions performed. Arguments that are generic classes themselves are represented as tuples (so that no new classes are created by this function). For example: _subs_tree(List[Tuple[int, T]][str]) == [(Tuple, int, str)] N)r����r�����__args__r�����__parameters__) rV���rb���r\���ZcurrentZ orig_chain� tree_argsr{���ZoclsZ new_tree_argsrC���rC���rD���r����D��s ���� r����c����������������s*��g�}xn|�D�]f}t�|t�r0|jtkr0|j|j��q t�|t�rft|�dkrf|d�tkrf|j|dd����q |j|��q W�t |���t���t|�k�r�g�}x(|D�] }|��kr�|j|����j |��q�W�|}���s�t����t |���x>|D�]6�t��t�s�q�t �fdd����h�D���rڈ�j ���q�W�t��fdd�|D���S�)z�An internal helper for Union creation and substitution: flatten Union's among parameters, then remove duplicates and strict subclasses. r���rK���Nc�������������3���s6���|�].}t�|t�o|jd�k st�|t�o,t��|�V��qd�S�)N)rl���r���r����ro���r����)r����Zt2)�t1rC���rD���r�������s��� z'_remove_dups_flatten.<locals>.<genexpr>c�������������3���s���|�]}|��kr|V��qd�S�)NrC���)r����r����)� all_paramsrC���rD���r�������s����)rl���r����r����r����extendr����rn���rk���r�����set�remover����ro����any)� parameters�params�pZ new_paramsr����rC���)r����r����rD����_remove_dups_flattene��s0���� " r����c�������������C���sX���|�j�stdt|�����t|�}t|�j��}||krTtd||kr@dndt|��||f���d�S�)Nz%s is not a generic classz0Too %s parameters for %s; actual %s, expected %sZmanyZfew)r����rP���r����rk���)rV���r����ZalenZelenrC���rC���rD����_check_generic���s���� r����c����������������s4���t�j������tj��j��t�j�����fdd��}|S�)zInternal wrapper caching __getitem__ of generic types with a fallback to original function for non-hashable arguments. c�����������������s*���y ��|�|�S��t�k r���Y�nX��|�|�S�)N)rP���)r\���r]���)�cached�funcrC���rD����inner���s ���� z_tp_cache.<locals>.inner)� functools� lru_cache� _cleanupsr�����cache_clear�wraps)r����r����rC���)r����r����rD���� _tp_cache���s����r����c�������������������s����e�Zd�ZdZdZd dd���fd d �Zdd��Zd d��Z��fdd�Z��fdd�Z e dd���Zd!dd�Zdd��Z dd��Zdd��Zdd��Z���ZS�)"r����a���Union type; Union[X, Y] means either X or Y. To define a union, use e.g. Union[int, str]. Details: - The arguments must be types and there must be at least one. - None as an argument is a special case and is replaced by type(None). - Unions of unions are flattened, e.g.:: Union[Union[int, str], float] == Union[int, str, float] - Unions of a single argument vanish, e.g.:: Union[int] == int # The constructor actually returns int - Redundant arguments are skipped, e.g.:: Union[int, str, int] == Union[int, str] - When comparing unions, the argument order is ignored, e.g.:: Union[int, str] == Union[str, int] - When two arguments have a subclass relationship, the least derived argument is kept, e.g.:: class Employee: pass class Manager(Employee): pass Union[int, Employee, Manager] == Union[int, Employee] Union[Manager, int, Employee] == Union[int, Employee] Union[Employee, Manager] == Employee - Similar for object:: Union[int, object] == object - You cannot subclass or instantiate a union. - You can use Optional[X] as a shorthand for Union[X, None]. r����r����r����� __tree_hash__NF)rO���c���������������s����t���j|�||f|�d|i�}|d�krHd�|_d�|_d�|_ttd��|_|S�t|t �sZt d��|tkr~t|�}t |�dkr~|d�S�t|�|_||_||_|j��}t|t �r�tt|��|_n t|�|_|S�)NrO���r���zExpected parameters=<tuple>rK���r���)r���)rT���rU���r����r����r����r����� frozensetr����rl���rn���rP���r���r����rk���r����r����)rV���r�����originrO���r\���r[���Z subs_tree)rZ���rC���rD���rU������s*���� z_Union.__new__c����������������s^���|�j�d�kr|�S�t���fdd�|�j�D���}t|�j����}||�j�krN||�jkrN|�S�|�j||dd�S�)Nc�������������3���s���|�]}t�|����V��qd�S�)N)ra���)r����r����)r_���r`���rC���rD���r�������s����z$_Union._eval_type.<locals>.<genexpr>T)rO���)r����rn���ra���r����rZ���)r[���r_���r`����ev_args� ev_originrC���)r_���r`���rD���ra������s���� z_Union._eval_typec�������������C���s���|�j�r|�jrt|�j|��d�S�)N)r����r����rc���)r[���rb���rC���rC���rD���rc�����s����z_Union._get_type_varsc����������������s<���|�j�d�krt��j��S�|�j��}t|t�s.t|�S�|d�j|�S�)Nr���)r����rT���rf���r����rl���rn���r����� _tree_repr)r[����tree)rZ���rC���rD���rf�����s���� z_Union.__repr__c����������������s`���g�}xB|dd���D�]2}t�|t�s0|jt|���q|j|d�j|���qW�t��j��ddj|���S�)NrK���r���z[%s]z, )rl���rn���r����rS���r����rT���rf���rQ���)r[���r�����arg_listr{���)rZ���rC���rD���r���� ��s���� z_Union._tree_reprc����������������sl���|f�krt�d��t|t�s |f}|�jd�kr0d��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.c�������������3���s���|�]}t�|���V��qd�S�)N)r}���)r����r����)r����rC���rD���r���� ��s����z%_Union.__getitem__.<locals>.<genexpr>T)r����rO���)rP���rl���rn���r����r���r����rZ���)r[���r����rC���)r����rD���r������s���� z_Union.__getitem__c�������������C���s>���|�t�krt�S�t|�||�}t|�}t|�dkr4|d�S�t�f|�S�)NrK���r���)r���r����r����rk���)r[���rb���r\���r����rC���rC���rD���r����%��s����z_Union._subs_treec�������������C���s6���t�|t�r|�j|jkS�|�tk r*|�j��|kS�|�|kS�d�S�)N)rl���r����r����r���r����)r[���r���rC���rC���rD���r����.��s ���� z _Union.__eq__c�������������C���s���|�j�S�)N)r����)r[���rC���rC���rD���r����6��s����z_Union.__hash__c�������������C���s���t�d��d�S�)Nz(Unions cannot be used with isinstance().)rP���)r[���r����rC���rC���rD���r����9��s����z_Union.__instancecheck__c�������������C���s���t�d��d�S�)Nz(Unions cannot be used with issubclass().)rP���)r[���rV���rC���rC���rD���r����<��s����z_Union.__subclasscheck__)r����r����r����r����)NN)NN)rA���rd���r@���rg���rq���rU���ra���rc���rf���r����r����r����r����r����r����r����r����ri���rC���rC���)rZ���rD���r�������s���* r����c���������������@���s ���e�Zd�ZdZf�Zedd���ZdS�)r����zEOptional type. Optional[X] is equivalent to Union[X, None]. c�������������C���s���t�|d�}t|td��f�S�)Nz#Optional[t] requires a single type.)r}���r���ro���)r[���r{���rC���rC���rD���r����K��s���� z_Optional.__getitem__N)rA���rd���r@���rg���rq���r����r����rC���rC���rC���rD���r����C��s���r����c�������������C���sJ���t�}x@t|�jdd���D�]*\}}t|t�r|jtkr|�j|d��}qW�|S�)z�Helper for Generic.__new__. Returns the class after the last occurrence of Generic or Generic[...] in cls.__mro__. NrK������)�objectr�����__mro__rl���r���r����r ���)rV���Znext_in_mror�����crC���rC���rD����_next_in_mroT��s ����r����c����������������s,���t���jtj�r��fdd�}n��fdd�}|S�)z�Construct a __subclasshook__ callable that incorporates the associated __extra__ class in subclass checks performed against cls. c����������������sZ�����j�j|��}|tk r|S���j�|�jkr(dS�x,��j�j��D�]}t|t�rDq4t|�|�r4dS�q4W�tS�)NT)� __extra__�__subclasshook__r~���r�����__subclasses__rl���r���r����)�subclass�res�scls)rV���rC���rD���� __extrahook__k��s���� z)_make_subclasshook.<locals>.__extrahook__c����������������s�����j�rt|���j��rdS�tS�)NT)r����r����r~���)r����)rV���rC���rD���r����y��s����)rl���r�����abc�ABCMeta)rV���r����rC���)rV���rD����_make_subclasshookb��s����r����c�������������C���s2���t�|��}d|kr.x|d�D�]}|j|d��qW�|S�)z�Internal helper: copy class __dict__ and clean slots class variables. (They will be re-created if necessary by normal class machinery.) rq���N)�dict�pop)ZdctZ dict_copyZslotrC���rC���rD����_no_slots_copy���s ����r����c�������������������s����e�Zd�ZdZd!��fdd� Zedd���Zejdd���Zedd ���Zejd d ���Zdd��Z d d��Z ��fdd�Z��fdd�Zd"dd�Z dd��Zdd��Zedd���Z��fdd�Zdd��Z��fdd �Z���ZS�)#r���ac��Metaclass for generic types. This is a metaclass for typing.Generic and generic ABCs defined in typing module. User defined subclasses of GenericMeta can override __new__ and invoke super().__new__. Note that GenericMeta.__new__ has strict rules on what is allowed in its bases argument: * plain Generic is disallowed in bases; * Generic[...] should appear in bases at most once; * if Generic[...] is present, then it should list all type variables that appear in other bases. In addition, type of all generic bases is erased, e.g., C[int] is stripped to plain C. Nc ����������������s���|dk r0|dk st��tdd��|D���s.t�|��n�|dks@t�|��|dksPt�|��|dks`t�|��t|�}d} xF|D�]>} | tkr�td��t| t�rr| jtkrr| dk r�td��| j} qrW�| dkr�|} nRt |�}t | ���|��k�stddj ��fdd�|D���dj d d��| D���f���| }|}|dk �rFt|�tj k�rF||k�rF|f|�}td d��|D���}tdd��|D����r~tdd��|D���}|j|||�s�dn|jd ���t��j|�|||dd�} tt| �jd|�s�| n|j��|| _|�r�tdd��|D���nd| _t| �| _|dk�r|| _d|k�r|�s2t| jdd�dk�r<t| �| _t|tj ��r\|j| _|j| _n|dk �rv|j| _|j| _|�r�t|d��r�|j| _|�r�t | j!���ntt| �j"��| _#| S�)z�Create a new generic class. GenericMeta.__new__ accepts keyword arguments that are used for internal bookkeeping, therefore an override should pass unused keyword arguments to super(). Nc�������������s���s���|�]}t�|t�V��qd�S�)N)rl���r���)r����r����rC���rC���rD���r�������s����z&GenericMeta.__new__.<locals>.<genexpr>z!Cannot inherit from plain Genericz0Cannot inherit from Generic[...] multiple types.z6Some type variables (%s) are not listed in Generic[%s]z, c�������������3���s���|�]}|��krt�|�V��qd�S�)N)rm���)r����r����)�gvarsetrC���rD���r�������s����c�������������s���s���|�]}t�|�V��qd�S�)N)rm���)r�����grC���rC���rD���r�������s����c�������������s���s"���|�]}t�|t�r|jn|V��qd�S�)N)rl���r���r����)r�����brC���rC���rD���r�������s����c�������������s���s ���|�]}t�|t�o|tk V��qd�S�)N)rl���r���r ���)r����r����rC���rC���rD���r�������s����c�������������s���s���|�]}|t�k r|V��qd�S�)N)r ���)r����r����rC���rC���rD���r�������s����)r����r����r����T)rO���r����c�������������s���s*���|�]"}|t�krd�n|tkrf�n|V��qdS�).N)�_TypingEllipsis�_TypingEmpty)r�����arC���rC���rD���r�������s���r����rA�����r����r@���)$r�����allr����r ���rP���rl���r���r����r����r����rQ���ro���r����r����rn���r�����updater����rT���rU����__setattr__r����r�����__next_in_mro__�__orig_bases__r����r����r����� _abc_registry� _abc_cacher����r@���r����r����r����r����)rV���rW���rX���rY���rb���r\���r�����extra� orig_basesZgvars�baseZtvarsetZ initial_basesr[���)rZ���)r����rD���rU������sr���� $ zGenericMeta.__new__c�������������C���s���t�|�jtj�r|�jjS�|�jjS�)N)rl���r����r����r�����_abc_negative_cacher�����_abc_generic_negative_cache)r[���rC���rC���rD���r�������s����zGenericMeta._abc_negative_cachec�������������C���s,���|�j�d�kr(t|�jtj�r"||�j_n||�_d�S�)N)r����rl���r����r����r����r����r����)r[����valuerC���rC���rD���r������s���� c�������������C���s���t�|�jtj�r|�jjS�|�jjS�)N)rl���r����r����r�����_abc_negative_cache_versionr�����#_abc_generic_negative_cache_version)r[���rC���rC���rD���r���� ��s����z'GenericMeta._abc_negative_cache_versionc�������������C���s,���|�j�d�kr(t|�jtj�r"||�j_n||�_d�S�)N)r����rl���r����r����r����r����r���)r[���r����rC���rC���rD���r������s���� c�������������C���s���|�j�r|�jrt|�j|��d�S�)N)r����r����rc���)r[���rb���rC���rC���rD���rc�����s����zGenericMeta._get_type_varsc���������� ������s����|�j�r|�j�j����nd�}|�jr8t���fdd�|�jD���nd�}||�j�krT||�jkrT|�S�|�j|�j|�jt|�j�|rtt |�nd�|||�j |�jd�S�)Nc�������������3���s���|�]}t�|����V��qd�S�)N)ra���)r����r����)r_���r`���rC���rD���r������s����z)GenericMeta._eval_type.<locals>.<genexpr>)rb���r\���r����r����r����)r����ra���r����rn���rZ���rA���� __bases__r�����__dict__r����r����r����)r[���r_���r`���r����r����rC���)r_���r`���rD���ra�����s����$zGenericMeta._eval_typec����������������s"���|�j�d�krt��j��S�|�j|�j���S�)N)r����rT���rf���r����r����)r[���)rZ���rC���rD���rf���+��s���� zGenericMeta.__repr__c����������������st���g�}xV|dd���D�]F}|f�kr*|j�d��qt|t�sD|j�t|���q|j�|d�j|���qW�t��j��ddj|���S�)NrK���z()r���z[%s]z, )r����rl���rn���rS���r����rT���rf���rQ���)r[���r����r����r{���)rZ���rC���rD���r����0��s���� zGenericMeta._tree_reprc�������������C���s*���|�j�d�kr|�S�t|�||�}|�jft|��S�)N)r����r����r����rn���)r[���rb���r\���r����rC���rC���rD���r����;��s���� zGenericMeta._subs_treec�������������C���s6���t�|t�stS�|�jd�ks"|jd�kr*|�|kS�|�j|jkS�)N)rl���r���r~���r����r����)r[���r���rC���rC���rD���r����A��s ���� zGenericMeta.__eq__c�������������C���s���|�j�S�)N)r����)r[���rC���rC���rD���r����H��s����zGenericMeta.__hash__c���������� ������s6��t�|t�s|f}|�r0|�jtk r0tdt|�����d��t��fdd�|D���}|�tkr�tdd��|D���sltd��tt |��t|�kr�td��|}|}nb|�tt fkr�t|�}|}nH|�tkr�|}|}n6|�j ttfkr�tdt|�����nt|�|��t|�}|}|�j d�k�r|�fnf�}|�j|�j||�j�t|�j�|||�|�j|�jd �S�) Nz)Parameter list to %s[...] cannot be emptyz*Parameters to generic types must be types.c�������������3���s���|�]}t�|���V��qd�S�)N)r}���)r����r����)r����rC���rD���r����S��s����z*GenericMeta.__getitem__.<locals>.<genexpr>c�������������s���s���|�]}t�|t�V��qd�S�)N)rl���r���)r����r����rC���rC���rD���r����V��s����z5Parameters to Generic[...] must all be type variablesz-Parameters to Generic[...] must all be uniquez'Cannot subscript already-subscripted %s)rb���r\���r����r����r����)rl���rn���r����r���rP���rE���r ���r����rk���r����r���r����r����r����r����r����rZ���rA���r��r����r��r����r����)r[���r����rb���r\���ZprependrC���)r����rD���r����K��sJ���� zGenericMeta.__getitem__c����������������sJ���|�j�d�k r*tjd�jd�dkr&td��dS�|�tkr>td|����t��j|�S�) NrK���rA���r����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_globalsrP���r ���rT���r����)r[���rV���)rZ���rC���rD���r����y��s���� zGenericMeta.__subclasscheck__c�������������C���s���t�|j|��S�)N)r����rZ���)r[���r����rC���rC���rD���r�������s����zGenericMeta.__instancecheck__c����������������sT���|j�d�r|jd�s(|j�d�s(|�jd�kr<tt|��j||��ntt|�j�j||��d�S�)N�__�_abc_)rL����endswithr����rT���r���r����)r[����attrr����)rZ���rC���rD���r�������s ���� zGenericMeta.__setattr__)NNNNN)NN)rA���rd���r@���rg���rU����propertyr�����setterr����rc���ra���rf���r����r����r����r����r����r����r����r����r����ri���rC���rC���)rZ���rD���r������s"��� ` .c�������������O���s����|j�d�kr@|�jtjkr,|jtjk r,|�j|�S�|�j|f|�|�S�nl|j}|�jtjkrj|jtjk rj|�j|�}n|�j|f|�|�}y ||_W�n�tk r����Y�nX�|j||��|S�d�S�)N)r����rU���r����r^���r����Z__orig_class__�AttributeError)Zbase_clsrV���r\���r]���r����r����rC���rC���rD����_generic_new���s ���� r��c���������������@���s���e�Zd�ZdZf�Zdd��ZdS�)r ���aC��Abstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default c�������������O���s&���|�j�tkrtd��t|�j|�f|�|�S�)NzHType Generic cannot be instantiated; it can be used only as a base class)r����r ���rP���r��r����)rV���r\���r]���rC���rC���rD���rU������s���� zGeneric.__new__N)rA���rd���r@���rg���rq���rU���rC���rC���rC���rD���r ������s���)rr���c���������������@���s���e�Zd�ZdZdS�)r����z�Internal placeholder for () or []. Used by TupleMeta and CallableMeta to allow empty list/tuple in specific places, without allowing them to sneak in where prohibited. N)rA���rd���r@���rg���rC���rC���rC���rD���r�������s���r����c���������������@���s���e�Zd�ZdZdS�)r����z(Internal placeholder for ... (ellipsis).N)rA���rd���r@���rg���rC���rC���rC���rD���r�������s���r����c�������������������s4���e�Zd�ZdZe��fdd��Zdd��Zdd��Z���ZS�)� TupleMetazMetaclass for Tuple (internal).c����������������s����|�j�d�k s|�jtk r t��j|�S�|f�kr6t��jtf�S�t|t�sF|f}t|�dkr�|d�dkr�d��t |d����}t��j|t f�S�d��t��fdd�|D���}t��j|�S�) Nr���rK���.z Tuple[t, ...]: t must be a type.r���z*Tuple[t0, t1, ...]: each t must be a type.c�������������3���s���|�]}t�|���V��qd�S�)N)r}���)r����r����)r����rC���rD���r�������s����z(TupleMeta.__getitem__.<locals>.<genexpr>)r����r����r���rT���r����r����rl���rn���rk���r}���r����)r[���r����r����)rZ���)r����rD���r�������s���� zTupleMeta.__getitem__c�������������C���s ���|�j�d�krt|t�S�td��d�S�)Nz5Parameterized Tuple cannot be used with isinstance().)r����rl���rn���rP���)r[���r����rC���rC���rD���r�������s���� zTupleMeta.__instancecheck__c�������������C���s ���|�j�d�krt|t�S�td��d�S�)Nz5Parameterized Tuple cannot be used with issubclass().)r����r����rn���rP���)r[���rV���rC���rC���rD���r�������s���� zTupleMeta.__subclasscheck__) rA���rd���r@���rg���r����r����r����r����ri���rC���rC���)rZ���rD���r �����s���r ��c���������������@���s���e�Zd�ZdZf�Zdd��ZdS�)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, ...]. c�������������O���s$���|�j�tkrtd��tt|�f|�|�S�)Nz6Type Tuple cannot be instantiated; use tuple() instead)r����r���rP���r��rn���)rV���r\���r]���rC���rC���rD���rU�����s���� z Tuple.__new__N)rA���rd���r@���rg���rq���rU���rC���rC���rC���rD���r������s���)r����rr���c�������������������sH���e�Zd�ZdZ��fdd�Z��fdd�Z��fdd�Ze��fdd ��Z���Z S�) �CallableMetaz"Metaclass for Callable (internal).c����������������s"���|�j�d�krt��j��S�|�j|�j���S�)N)r����rT���rf���r����r����)r[���)rZ���rC���rD���rf�����s���� zCallableMeta.__repr__c����������������s����|�j�tk rt��j|�S�g�}xB|dd���D�]2}t|t�sF|jt|���q(|j|d�j|���q(W�|d�dkr�t|d��d|d���S�t|d��ddj |d�d���|d�f��S�) NrK���r���z...z [..., %s]z [[%s], %s]z, r����r����) r����r���rT���r����rl���rn���r����rS���r����rQ���)r[���r����r����r{���)rZ���rC���rD���r������s���� zCallableMeta._tree_reprc����������������s����|�j�dk s|�jtk r t��j|�S�t|t��s8t|�dkr@td��|\}}|t krZt |f}n$t|t �srtd|f���t|�|f}|�j|�S�)zxA thin wrapper around __getitem_inner__ to provide the latter with hashable arguments to improve speed. Nr���z6Callable must be used as Callable[[arg, ...], result].z8Callable[args, result]: args must be a list. Got %.100r.)r����r����r���rT���r����rl���rn���rk���rP����Ellipsis�list�__getitem_inner__)r[���r����r\����result)rZ���rC���rD���r����*��s���� zCallableMeta.__getitem__c����������������s^���|\}}d��t�|���}|tkr.t��jt|f�S�d��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.c�������������3���s���|�]}t�|���V��qd�S�)N)r}���)r����r{���)r����rC���rD���r����F��s����z1CallableMeta.__getitem_inner__.<locals>.<genexpr>)r}���r��rT���r����r����rn���)r[���r����r\���r��)rZ���)r����rD���r��>��s���� zCallableMeta.__getitem_inner__) rA���rd���r@���rg���rf���r����r����r����r��ri���rC���rC���)rZ���rD���r����s ���r��c���������������@���s���e�Zd�ZdZf�Zdd��ZdS�)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. c�������������O���s&���|�j�tkrtd��t|�j|�f|�|�S�)NzIType Callable cannot be instantiated; use a non-abstract subclass instead)r����r���rP���r��r����)rV���r\���r]���rC���rC���rD���rU���X��s���� zCallable.__new__N)rA���rd���r@���rg���rq���rU���rC���rC���rC���rD���r���K��s��� c�������������������sN���e�Zd�ZdZdZddd�Zdd��Zdd ��Z��fd d�Zdd ��Z dd��Z ���ZS�)r����a3��Special type construct to mark class variables. An annotation wrapped in ClassVar indicates that a given attribute is intended to be used as a class variable and should not be set on instances of that class. Usage:: class Starship: stats: ClassVar[Dict[str, int]] = {} # class variable damage: int = 10 # instance variable ClassVar accepts only types and cannot be further subscribed. Note that ClassVar is not a class itself, and should not be used with isinstance() or issubclass(). �__type__Nc�������������K���s ���||�_�d�S�)N)r��)r[����tpr]���rC���rC���rD���r^���r��s����z_ClassVar.__init__c�������������C���sP���t�|��}|�jd�kr4|t|dj|jdd�����dd�S�tdj|jdd������d�S�)Nz{} accepts only single type.rK���T)rO���z {} cannot be further subscripted)ro���r��r}����formatrA���rP���)r[����itemrV���rC���rC���rD���r����u��s���� z_ClassVar.__getitem__c�������������C���s,���t�|�j||�}||�jkr|�S�t|��|dd�S�)NT)rO���)ra���r��ro���)r[���r_���r`���Znew_tprC���rC���rD���ra���~��s���� z_ClassVar._eval_typec����������������s,���t���j��}|�jd�k r(|djt|�j��7�}|S�)Nz[{}])rT���rf���r��r��rS���)r[����r)rZ���rC���rD���rf������s���� z_ClassVar.__repr__c�������������C���s���t�t|��j|�jf�S�)N)r����ro���rA���r��)r[���rC���rC���rD���r�������s����z_ClassVar.__hash__c�������������C���s,���t�|t�stS�|�jd�k r$|�j|jkS�|�|kS�)N)rl���r����r~���r��)r[���r���rC���rC���rD���r�������s ���� z_ClassVar.__eq__)r��)N)rA���rd���r@���rg���rq���r^���r����ra���rf���r����r����ri���rC���rC���)rZ���rD���r����_��s��� r����c�������������C���s���|S�)z�Cast a value to a type. This returns the value unchanged. To the type checker this signals that the return value has the designated type, but at runtime we intentionally don't check anything (we want this to be as fast as possible). rC���)�typ�valrC���rC���rD���r6������s����c������� ������C���s����y |�j�}W�n�tk r���i�S�X�|j}|j}|d|��}|�jp@f�}|�j}|rTt|�ni�}|t|��}x2t||d��|�D�]\}} ||ks�t �| ||<�qxW�|S�)z:Internal helper to extract the default arguments, by name.N) �__code__r���co_argcount�co_varnames�__defaults__�__kwdefaults__r����rk����zipr����) r����r|���Z pos_countZ arg_names�defaultsZ kwdefaultsr����Z pos_offsetrW���r����rC���rC���rD���� _get_defaults���s���� r!��c������� ������C���s���t�|�dd�ri�S�t|�t�r�i�}x�t|�j�D�]z}|dkrFtj|j�j}n|}|jj di��}xJ|j ��D�]>\}}|dkrztd�}t|t�r�t|�}t |||�}|||<�qbW�q*W�|S�|dkr�t|�tj�r�|�j}nt�|�di��}|dkr�|}n|dkr�|}t�|�dd�}|dk�r"t|�t��ri�S�tdj|����t|��} t|�}xp|j ��D�]d\}}|dk�rVtd�}t|t��rjt|�}t |||�}|| k�r�| |�dk�r�t|�}|||<��q<W�|S�)a���Return type hints for an object. This is often the same as obj.__annotations__, but it handles forward references encoded as string literals, and if necessary adds Optional[t] if a default value equal to None is set. The argument may be a module, class, method, or function. The annotations are returned as a dictionary. For classes, annotations include also inherited members. TypeError is raised if the argument is not of a type that can contain annotations, and an empty dictionary is returned if no annotations are present. BEWARE -- the behavior of globalns and localns is counterintuitive (unless you are familiar with how eval() and exec() work). The search order is locals first, then globals. - If no dict arguments are passed, an attempt is made to use the globals from obj (or the respective module's globals for classes), and these are also used as the locals. If the object does not appear to have globals, an empty dictionary is used. - If one dict argument is passed, it is used for both globals and locals. - If two dict arguments are passed, they specify globals and locals, respectively. �__no_type_check__N�__annotations__�__globals__z1{!r} is not a module, class, method, or function.)r����rl���ro����reversedr����r>����modulesrd���r���get�itemsrm���rG���ra���r����� ModuleType�_allowed_typesrP���r��r!��r����r���) r����r_���r`���Zhintsr����Zbase_globalsZannrW���r����r ��rC���rC���rD���r7������sV���� c�������������C���s����t�|�t�r||�jj��}x0|�jj��D�]"\}}||�j|�f�kr |j|��q W�x4|j��D�](}t�|tj �rfd|_ t�|t�rPt|��qPW�y d|�_ W�n�tk r����Y�nX�|�S�)aI��Decorator to indicate that annotations are not type hints. The argument must be a class or function; if it is a class, it applies recursively to all methods and classes defined in that class (but not to methods defined in its superclasses or subclasses). This mutates the function(s) or class(es) in place. T) rl���ro���r���copyr(��r��r�����valuesr����r����r"��r9���rP���)r{���Z arg_attrsr��r��r����rC���rC���rD���r9�����s���� c����������������s���t�j�����fdd��}|S�)z�Decorator to give another decorator the @no_type_check effect. This wraps the decorator with something that wraps the decorated function in @no_type_check. c�����������������s�����|�|�}t�|�}|S�)N)r9���)r\���r]���r����)� decoratorrC���rD����wrapped_decorator/��s���� z2no_type_check_decorator.<locals>.wrapped_decorator)r����r����)r-��r.��rC���)r-��rD���r:���(��s����c��������������O���s���t�d��dS�)z*Helper for @overload to raise when called.z�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.N)�NotImplementedError)r\���r]���rC���rC���rD����_overload_dummy8��s����r0��c�������������C���s���t�S�)a ��Decorator for overloaded functions/methods. In a stub file, place two or more stub definitions for the same function in a row, each decorated with @overload. For example: @overload def utf8(value: None) -> None: ... @overload def utf8(value: bytes) -> bytes: ... @overload def utf8(value: str) -> bytes: ... In a non-stub file (i.e. a regular .py file), do the same but follow it with an implementation. The implementation should *not* be decorated with @overload. For example: @overload def utf8(value: None) -> None: ... @overload def utf8(value: bytes) -> bytes: ... @overload def utf8(value: str) -> bytes: ... def utf8(value): # implementation goes here )r0��)r����rC���rC���rD���r;���A��s����c�������������������s0���e�Zd�ZdZ��fdd�Zdd��Zdd��Z���ZS�)� _ProtocolMetaz~Internal metaclass for _Protocol. This exists so _Protocol classes can be generic without deriving from Generic. c����������������s"���t�|�jkrt��j|�S�td��d�S�)Nz+Protocols cannot be used with isinstance().)r����r��rT���r����rP���)r[���r����)rZ���rC���rD���r����e��s���� z_ProtocolMeta.__instancecheck__c����������������sL���|�j�s tS�|�tkrdS�|�j��}x(|D�] ��t��fdd�|jD���s$dS�q$W�dS�)NTc�������������3���s���|�]}��|j�kV��qd�S�)N)r��)r�����d)r��rC���rD���r����w��s����z2_ProtocolMeta.__subclasscheck__.<locals>.<genexpr>F)rh���r~���r�����_get_protocol_attrsr����r����)r[���rV����attrsrC���)r��rD���r����j��s���� z_ProtocolMeta.__subclasscheck__c�������������C���s,��g�}x.|�j�D�]$}t|dd�r|jdkr|j|��qW�t��}��x�|D���]�}x�|jj��D�]�}x�|�j�D�]&}||k r`||jkr`t|dd��r`P�q`W�|jd��rT|dkrT|dkrT|dkrT|dkrT|dkrT|d krT|d krT|dkrT|dkrT|d krT|dkrT|dkrT|dkrT|dkrT|dkrT|dkrT|j|��qTW�qBW�|S�)Nrh���Fr����r���__abstractmethods__r#��rj���r����r��r����rq���r3��r����r����r����r����r����r����rd���) r����r����rA���r����r����r���keysrL����add)r[���Zprotocol_basesr����r4��r����r��rC���rC���rD���r3��{��s<����z!_ProtocolMeta._get_protocol_attrs)rA���rd���r@���rg���r����r����r3��ri���rC���rC���)rZ���rD���r1��^��s���r1��c���������������@���s���e�Zd�ZdZf�ZdZdS�)r����z�Internal base class for protocol classes. This implements a simple-minded structural issubclass check (similar but more general than the one-offs in collections.abc such as Hashable). TN)rA���rd���r@���rg���rq���rh���rC���rC���rC���rD���r�������s���r����� Awaitablec���������������@���s���e�Zd�Zf�ZdS�)r8��N)rA���rd���r@���rq���rC���rC���rC���rD���r8�����s���)r����� Coroutinec���������������@���s���e�Zd�Zf�ZdS�)r9��N)rA���rd���r@���rq���rC���rC���rC���rD���r9�����s���� AsyncIterablec���������������@���s���e�Zd�Zf�ZdS�)r:��N)rA���rd���r@���rq���rC���rC���rC���rD���r:�����s���c���������������@���s���e�Zd�Zf�ZdS�)� AsyncIteratorN)rA���rd���r@���rq���rC���rC���rC���rD���r;�����s���r;��c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r������s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r������s���c���������������@���s"���e�Zd�Zf�Zeed�dd��ZdS�)r*���)�returnc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����__int__���s����zSupportsInt.__int__N)rA���rd���r@���rq���r����intr=��rC���rC���rC���rD���r*������s���c���������������@���s"���e�Zd�Zf�Zeed�dd��ZdS�)r)���)r<��c�������������C���s���d�S�)NrC���)r[���rC���rC���rD���� __float__���s����zSupportsFloat.__float__N)rA���rd���r@���rq���r����floatr?��rC���rC���rC���rD���r)������s���c���������������@���s"���e�Zd�Zf�Zeed�dd��ZdS�)r(���)r<��c�������������C���s���d�S�)NrC���)r[���rC���rC���rD����__complex__���s����zSupportsComplex.__complex__N)rA���rd���r@���rq���r����complexrA��rC���rC���rC���rD���r(������s���c���������������@���s"���e�Zd�Zf�Zeed�dd��ZdS�)r'���)r<��c�������������C���s���d�S�)NrC���)r[���rC���rC���rD���� __bytes__���s����zSupportsBytes.__bytes__N)rA���rd���r@���rq���r����bytesrC��rC���rC���rC���rD���r'������s���c���������������@���s"���e�Zd�Zf�Zeed�dd��ZdS�)r&���)r<��c�������������C���s���d�S�)NrC���)r[���rC���rC���rD����__abs__���s����zSupportsAbs.__abs__N)rA���rd���r@���rq���r���r����rE��rC���rC���rC���rD���r&������s���c���������������@���s&���e�Zd�Zf�Zedeed�dd��ZdS�)r+���r���)�ndigitsr<��c�������������C���s���d�S�)NrC���)r[���rF��rC���rC���rD���� __round__��s����zSupportsRound.__round__N)r���)rA���rd���r@���rq���r���r>��r����rG��rC���rC���rC���rD���r+�����s���c���������������@���s���e�Zd�Zf�ZdS�)r%���N)rA���rd���r@���rq���rC���rC���rC���rD���r%��� ��s���c���������������@���s"���e�Zd�Zf�Zedd�dd��ZdS�)r%���zIterator[T_co])r<��c�������������C���s���d�S�)NrC���)r[���rC���rC���rD����__reversed__��s����zReversible.__reversed__N)rA���rd���r@���rq���r���rH��rC���rC���rC���rD���r%��� ��s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r�����s���� Collectionc���������������@���s���e�Zd�Zf�ZdS�)rI��N)rA���rd���r@���rq���rC���rC���rC���rD���rI����s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r���'��s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r���+��s���c���������������@���s���e�Zd�Zf�ZdS�)r!���N)rA���rd���r@���rq���rC���rC���rC���rD���r!���0��s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r���6��s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r���:��s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r���?��s���c���������������@���s���e�Zd�Zf�ZdS�)r"���N)rA���rd���r@���rq���rC���rC���rC���rD���r"���E��s���c���������������@���s���e�Zd�Zf�ZdS�)r"���N)rA���rd���r@���rq���rC���rC���rC���rD���r"���I��s���c���������������@���s���e�Zd�Zf�ZdS�)r"���N)rA���rd���r@���rq���rC���rC���rC���rD���r"���M��s���c���������������@���s���e�Zd�Zf�ZdS�)r ���N)rA���rd���r@���rq���rC���rC���rC���rD���r ���R��s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r���V��s���c���������������@���s���e�Zd�Zf�Zdd��ZdS�)r0���c�������������O���s$���|�j�tkrtd��tt|�f|�|�S�)Nz4Type List cannot be instantiated; use list() instead)r����r0���rP���r��r��)rV���r\���r]���rC���rC���rD���rU���^��s���� zList.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���r0���Z��s���c���������������@���s���e�Zd�Zf�Zdd��ZdS�)r-���c�������������O���s*���|�j�tkrtj||�S�ttj|�f|�|�S�)N)r����r-����collections�dequer��)rV���r\���r]���rC���rC���rD���rU���i��s���� z Deque.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���r-���e��s���c���������������@���s���e�Zd�Zf�Zdd��ZdS�)r1���c�������������O���s$���|�j�tkrtd��tt|�f|�|�S�)Nz2Type Set cannot be instantiated; use set() instead)r����r1���rP���r��r����)rV���r\���r]���rC���rC���rD���rU���s��s���� zSet.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���r1���o��s���c���������������@���s���e�Zd�Zf�Zdd��ZdS�)r2���c�������������O���s$���|�j�tkrtd��tt|�f|�|�S�)Nz>Type FrozenSet cannot be instantiated; use frozenset() instead)r����r2���rP���r��r����)rV���r\���r]���rC���rC���rD���rU���}��s���� zFrozenSet.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���r2���z��s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r������s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r������s���c���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r������s���c���������������@���s���e�Zd�Zf�ZdS�)r$���N)rA���rd���r@���rq���rC���rC���rC���rD���r$������s����AbstractContextManagerc���������������@���s���e�Zd�Zf�ZdS�)r���N)rA���rd���r@���rq���rC���rC���rC���rD���r������s���c���������������@���s2���e�Zd�Zf�Zdd��Zejdd���Zedd���Z dS�)r���c�������������C���s���|�S�)NrC���)r[���rC���rC���rD���� __enter__���s����zContextManager.__enter__c�������������C���s���d�S�)NrC���)r[����exc_type� exc_value� tracebackrC���rC���rD����__exit__���s����zContextManager.__exit__c�������������C���s8���|�t�kr4tdd��|jD���r4tdd��|jD���r4dS�tS�)Nc�������������s���s���|�]}d�|j�kV��qdS�)rM��N)r��)r�����BrC���rC���rD���r�������s����z2ContextManager.__subclasshook__.<locals>.<genexpr>c�������������s���s���|�]}d�|j�kV��qdS�)rQ��N)r��)r����rR��rC���rC���rD���r�������s����T)r���r����r����r~���)rV����CrC���rC���rD���r�������s ����zContextManager.__subclasshook__N) rA���rd���r@���rq���rM��r����r���rQ���classmethodr����rC���rC���rC���rD���r������s����AbstractAsyncContextManagerc���������������@���s���e�Zd�Zf�ZdS�)�AsyncContextManagerN)rA���rd���r@���rq���rC���rC���rC���rD���rV�����s���rV������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���������������@���s���e�Zd�Zf�Zdd��ZdS�)r.���c�������������O���s$���|�j�tkrtd��tt|�f|�|�S�)Nz4Type Dict cannot be instantiated; use dict() instead)r����r.���rP���r��r����)rV���r\���r]���rC���rC���rD���rU������s���� zDict.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���r.������s���c���������������@���s���e�Zd�Zf�Zdd��ZdS�)r/���c�������������O���s*���|�j�tkrtj||�S�ttj|�f|�|�S�)N)r����r/���rJ���defaultdictr��)rV���r\���r]���rC���rC���rD���rU������s���� zDefaultDict.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���r/������s���c���������������@���s���e�Zd�Zf�Zdd��ZdS�)r,���c�������������O���s*���|�j�tkrtj||�S�ttj|�f|�|�S�)N)r����r,���rJ��r��)rV���r\���r]���rC���rC���rD���rU������s���� zCounter.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���r,������s����ChainMapc���������������@���s���e�Zd�Zf�Zdd��ZdS�)rY��c�������������O���s*���|�j�tkrtj||�S�ttj|�f|�|�S�)N)r����rY��rJ��r��)rV���r\���r]���rC���rC���rD���rU������s���� zChainMap.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���rY�����s���c���������������@���s���e�Zd�Zf�Zdd��ZdS�)r4���c�������������O���s$���|�j�tkrtd��tt|�f|�|�S�)Nz@Type Generator cannot be instantiated; create a subclass instead)r����r4���rP���r���_G_base)rV���r\���r]���rC���rC���rD���rU�����s���� zGenerator.__new__N)rA���rd���r@���rq���rU���rC���rC���rC���rD���r4�����s����AsyncGeneratorc���������������@���s���e�Zd�Zf�ZdS�)r[��N)rA���rd���r@���rq���rC���rC���rC���rD���r[����s����CT_co)r����r����c���������������@���s���e�Zd�ZdZf�ZdS�)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. N)rA���rd���r@���rg���rq���rC���rC���rC���rD���r���$��s���c����������������sv���d����fdd�|D��}t�j|�dd��|D���}t�j|��|_|_ytjd�jjdd�|_ W�n�t tfk rp���Y�nX�|S�)NzDNamedTuple('Name', [(f0, t0), (f1, t1), ...]); each t must be a typec����������������s���g�|�]\}}|t�|���f�qS�rC���)r}���)r�����nr����)r����rC���rD���� <listcomp>A��s����z!_make_nmtuple.<locals>.<listcomp>c�������������S���s���g�|�]\}}|�qS�rC���rC���)r����r]��r����rC���rC���rD���r^��B��s����r���rA����__main__)rJ��� namedtuple�OrderedDictr#���_field_typesr>���r��r��r'��rd���r��r����)rW���r�����nm_tplrC���)r����rD���� _make_nmtuple?��s����rd��rU���r^���rq����__getnewargs__�_fields�_field_defaultsrb���_make�_replace�_asdict�_sourcerd���rA���r@���r#��c�������������������s���e�Zd�Z��fdd�Z���ZS�)�NamedTupleMetac����������������s��|j�dd�rt��j|�|||�S�ts*td��|j�di��}t||j���}g�}i�}xP|D�]H}||krz||�} |j| ��| ||<�qR|rRtdj|dj |j ���d���qRW�tj|�|j_ t|�|j_||_xD|D�]<} | tkr�td| ���q�| tko�| |jkr�t|| || ���q�W�|S�) NrO���Fz<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'��rT���rU����_PY36rP���rd��r(��r����r��rQ���r6��rJ��ra��r#��rn���r��rg���_prohibitedr���_specialrf���setattr)rV����typenamerX����nsr����rc��r ��Z defaults_dictrm��Z default_value�key)rZ���rC���rD���rU���Y��s4���� zNamedTupleMeta.__new__)rA���rd���r@���rU���ri���rC���rC���)rZ���rD���rl��W��s���rl��c���������������@���s���e�Zd�ZdZdZddd�ZdS�)r3���a4��Typed version of namedtuple. Usage in Python versions >= 3.6:: class Employee(NamedTuple): name: str id: int This is equivalent to:: Employee = collections.namedtuple('Employee', ['name', 'id']) The resulting class has extra __annotations__ and _field_types attributes, giving an ordered dict mapping field names to types. __annotations__ should be preferred, while _field_types is kept to maintain pre PEP 526 compatibility. (The field names are in the _fields attribute, which is part of the namedtuple API.) Alternative equivalent keyword syntax is also accepted:: Employee = NamedTuple('Employee', name=str, id=int) In Python versions <= 3.5 use:: Employee = NamedTuple('Employee', [('name', str), ('id', int)]) TNc�������������K���s:���|rt��rtd��|d�kr$|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)rn��rP���r(��rd��)r[���rr��Zfields�kwargsrC���rC���rD���rU������s���� zNamedTuple.__new__)N)rA���rd���r@���rg���rO���rU���rC���rC���rC���rD���r3���y��s���c�������������C���s���dd��}|�|_�||_|S�)a%��NewType creates simple unique types with almost zero runtime overhead. NewType(name, tp) is considered a subtype of tp by static type checkers. At runtime, NewType(name, tp) returns a dummy function that simply returns its argument. Usage:: UserId = NewType('UserId', int) def name_by_id(user_id: UserId) -> str: ... UserId('user') # Fails type check name_by_id(42) # Fails type check name_by_id(UserId(42)) # OK num = UserId(5) + 1 # type: int c�������������S���s���|�S�)NrC���)rB���rC���rC���rD����new_type���s����zNewType.<locals>.new_type)rA���Z __supertype__)rW���r��rv��rC���rC���rD���r8������s����Fc���������������@���s���e�Zd�ZdZf�Zeed�dd��Zeed�dd��Ze dd�dd ��Z e ed�d d��Ze e d�dd ��Ze dd�dd��Ze ed�dd��Ze d7e ed�dd��Ze ed�dd��Ze d9e ed�dd��Ze d;e ee�d�dd��Ze d<e e e d�d d!��Ze ed�d"d#��Ze e d�d$d%��Ze d=e e d&�d'd(��Ze ed�d)d*��Ze ee d+�d,d-��Ze ee�dd.�d/d0��Ze d1d�d2d3��Ze dd�d4d5��ZdS�)>�IOa���Generic base class for TextIO and BinaryIO. This is an abstract, generic version of the return of open(). NOTE: This does not distinguish between the different possible classes (text vs. binary, read vs. write vs. read/write, append-only, unbuffered). The TextIO and BinaryIO subclasses below capture the distinctions between text vs. binary, which is pervasive in the interface; however we currently do not offer a way to track the other distinctions in the type system. )r<��c�������������C���s���d�S�)NrC���)r[���rC���rC���rD����mode���s����zIO.modec�������������C���s���d�S�)NrC���)r[���rC���rC���rD���rW������s����zIO.nameNc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����close���s����zIO.closec�������������C���s���d�S�)NrC���)r[���rC���rC���rD����closed���s����z IO.closedc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����fileno���s����z IO.filenoc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����flush���s����zIO.flushc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����isatty���s����z IO.isattyrK���)r]��r<��c�������������C���s���d�S�)NrC���)r[���r]��rC���rC���rD����read���s����zIO.readc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����readable���s����zIO.readable)�limitr<��c�������������C���s���d�S�)NrC���)r[���r���rC���rC���rD����readline���s����zIO.readline)�hintr<��c�������������C���s���d�S�)NrC���)r[���r���rC���rC���rD���� readlines���s����zIO.readlinesr���)�offset�whencer<��c�������������C���s���d�S�)NrC���)r[���r���r���rC���rC���rD����seek���s����zIO.seekc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����seekable ��s����zIO.seekablec�������������C���s���d�S�)NrC���)r[���rC���rC���rD����tell ��s����zIO.tell)�sizer<��c�������������C���s���d�S�)NrC���)r[���r���rC���rC���rD����truncate ��s����zIO.truncatec�������������C���s���d�S�)NrC���)r[���rC���rC���rD����writable ��s����zIO.writable)�sr<��c�������������C���s���d�S�)NrC���)r[���r���rC���rC���rD����write ��s����zIO.write)�linesr<��c�������������C���s���d�S�)NrC���)r[���r���rC���rC���rD���� writelines ��s����z IO.writelinesz IO[AnyStr]c�������������C���s���d�S�)NrC���)r[���rC���rC���rD���rM�� ��s����zIO.__enter__c�������������C���s���d�S�)NrC���)r[���ro���r����rP��rC���rC���rD���rQ�� ��s����zIO.__exit__r����)r����r����)r����r����)r����)r���)N) rA���rd���r@���rg���rq���r���rm���rx��rW���r���ry��r����rz��r>��r{��r|��r}��r5���r~��r��r���r0���r���r���r���r���r���r���r���r���rM��rQ��rC���rC���rC���rD���rw�����sT���rw��c���������������@���sB���e�Zd�ZdZf�Zeeeef�e d�dd��Z ed�d�dd��ZdS�) �BinaryIOz5Typed version of the return of open() in binary mode.)r���r<��c�������������C���s���d�S�)NrC���)r[���r���rC���rC���rD���r���) ��s����zBinaryIO.write)r<��c�������������C���s���d�S�)NrC���)r[���rC���rC���rD���rM��- ��s����zBinaryIO.__enter__N)rA���rd���r@���rg���rq���r���r���rD��� bytearrayr>��r���rM��rC���rC���rC���rD���r���$ ��s���r���c���������������@���s����e�Zd�ZdZf�Zeed�dd��Zeed�dd��Z ee e�d�dd��Zeed�d d ��Z eed�dd��Zed�d�d d��ZdS�)�TextIOz3Typed version of the return of open() in text mode.)r<��c�������������C���s���d�S�)NrC���)r[���rC���rC���rD����buffer7 ��s����z TextIO.bufferc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����encoding; ��s����zTextIO.encodingc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����errors? ��s����z TextIO.errorsc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����line_bufferingC ��s����zTextIO.line_bufferingc�������������C���s���d�S�)NrC���)r[���rC���rC���rD����newlinesG ��s����zTextIO.newlinesc�������������C���s���d�S�)NrC���)r[���rC���rC���rD���rM��K ��s����zTextIO.__enter__N)rA���rd���r@���rg���rq���r���r���r���rm���r���r���r���r����r���r ���r���r���rM��rC���rC���rC���rD���r���2 ��s���r���c���������������@���s&���e�Zd�ZdZdddgZeZeZeZdS�)�ioz)Wrapper namespace for IO generic classes.rw��r���r���N)rA���rd���r@���rg����__all__rw��r���r���rC���rC���rC���rD���r���P ��s ��� r���z.io�Patternr����c�������������C���s���|�j�S�)N)�pattern)r����rC���rC���rD����<lambda>^ ��s����r����Matchc�������������C���s���|�j�jS�)N)�rer���)�mrC���rC���rD���r���` ��s����c���������������@���s ���e�Zd�ZdZddgZeZeZdS�)r���z&Wrapper namespace for re type aliases.r���r���N)rA���rd���r@���rg���r���r���r���rC���rC���rC���rD���r���c ��s���r���z.re)r���r���)NN)NN)r���rW��)r���r���)rU���r^���rq���re��rf��rg��rb��rh��ri��rj��rk��)rd���rA���r@���r#��)�r����r���r���rJ��� contextlibr����r���Z stdlib_rer>���r�����collections.abcZcollections_abc�ImportErrorr?����_collections_abcr���r���r ���ro���r����r^����__str__rm���rQ���r���rE���rM���rN���rH���rI���rG���rF���rc���r����ra���r}���rS���r����r ���r����ZNoReturnr���r����r����r����r����r����r����r����rD��r5���r����r����r����r����r����r����r����r���r����r���r����r����r����r����r���r ���r��r����r����r ��rn���r���r��r���r����r���r6���r!��r�����BuiltinFunctionType� MethodTyper)��r*��r7���r9���r:���r0��r;���r1��r����r���r����r8��r����r9��r:��r;��r���r���r*���r)���r(���r'���r&���r+���r%���r#���r���rI��r1���r���r!���r���r���r"���r ���r>��r���r��r0���rK��r-���r����r����r2���r���r���r���r$���rL��r���rU��rV���execr����r.���rX��r/���r,���rY��r4���rZ��� GeneratorTyper[��r\��r���rd��rn��ro��rp��rl��r3���r8���r<���r=���rw��r���r���r���rA���r&��ry���r����matchr���rC���rC���rC���rD����<module>���s��� *%5C W !)� ��"96 R D " " ��"(`