%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core/current/usr/lib/python3.5/__pycache__/
Upload File :
Create Path :
Current File : //snap/core/current/usr/lib/python3.5/__pycache__/typing.cpython-35.pyc



|�g��7@stddlZddlmZmZddlZddlZddlZddlZddlZddl	Z	yddl
jZWnek
r�ddlZYnXddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1g/Z
d2d3�ZGd4d5�d5e�ZGd6d7�d7�ZGd8d9�d9e�ZGd:d;�d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZGdFdG�dGe�ZGdHd�dedIedJdK�ZGdLd	�d	edIedJdK�ZedM�ZedN�ZedO�ZedPdQdK�ZedRdQdK�Z edSdQdK�Z!edTdUdK�Z"ed)e#e$�Z%GdVdW�dWe�Z&GdXd
�d
edIe&dJdK�Z'GdYdZ�dZe�Z(Gd[d�dedIe(dJdK�Z)Gd\d]�d]e�Z*Gd^d�dedIe*dJdK�Z+Gd_d`�d`e�Z,Gdad�dedIe,dJdK�Z-dbdc�Z.ddde�Z/dfdg�Z0Gdhdi�dieej1�Z2dZ3Gdjd�ddIe2�Z3dkd*�Z4dldm�Z5dddnd+�Z6dod-�Z7dpd.�Z8dqdr�Z9dsd/�Z:Gdtdu�due2�Z;Gdvdw�dwdIe;�Z<ej=Z=e>ed�r�Gdxd�de3edyej?�Z?ndZ?e>ed�rGdzd�de3edyej@�Z@Gd{d
�d
e@edyejA�ZAndZ@dZAGd|d�de3edyejB�ZBGd}d�deBedyejC�ZCGd~d!�d!e<�ZDGdd �d e<�ZEGd�d��d�e<�ZFGd�d��d�e<�ZGGd�d�de<e�ZHGd�d"�d"e<e�ZIe>ed�rGd�d�deBedyejJ�ZJnGd�d�de<e�ZJejKZKGd�d�de3edyejL�ZLGd�d�deKeBeeLedyejM�ZNGd�d�deNedyejO�ZOGd�d�deKeBeeLee3ee!fdyejP�ZPGd�d�dePeefdyejQ�ZQe>ed�rRGd�d�deKeJeeLedyejR�ZRn-Gd�d�deKeBeeLedyejR�ZRGd�d�deRedyejS�ZSGd�d�deReTdyejU�ZUeUjVeeWd����Gd�d%�d%eXeSedyeX�ZYGd�d&�d&eZeOedyeZ�ZMGd�d��d�e2�Z[Gd�d��d�e\eNedIe[dye\�Z]Gd�d�deKeBedyej^�Z^Gd�d�de^eeNedyej_�Z_Gd�d�de^e+ee!feNe+ee!fe3ee!fdyej`�Z`Gd�d�de^e!dyeja�Zae>ed��r`	Gd�d��d�e3edyejb�Zce
jdd��Gd�d#�d#eeeQeefdyee�ZfGd�d$�d$ejgeQeefdyejg�Zhe>ed(�r�	ejiZjn	e	jkZjGd�d(�d(eCee3ee"e fdyej�Zied�dQdKd�e�ZlGd�d�dee3eldye�Zmd�d'�Znd�d,�Zoe$Zpd�ZqGd�d��d�e3e%�ZrGd�d��d�ere#�ZsGd�d��d�ere$�ZtGd�d��d��Zuevd�eu_veuejweujv<ed�e%eejxd���d�d���Zyed�e%eejzd�d���d�d���Z{Gd�d��d��Zevd�e_veejwejv<dS)��N)�abstractmethod�abstractproperty�Any�Callable�Generic�Optional�Tuple�Type�TypeVar�Union�AbstractSet�	Awaitable�
AsyncIterator�
AsyncIterable�
ByteString�	Container�Hashable�	ItemsView�Iterable�Iterator�KeysView�Mapping�MappingView�MutableMapping�MutableSequence�
MutableSet�Sequence�Sized�
ValuesView�
Reversible�SupportsAbs�
SupportsFloat�SupportsInt�
SupportsRound�Dict�DefaultDict�List�Set�
NamedTuple�	Generator�AnyStr�cast�get_type_hints�NewType�
no_type_check�no_type_check_decorator�overload�Text�
TYPE_CHECKINGcCs+tjdd�dkr |jS|jSdS)N��)r4r4)�sys�version_info�__qualname__�__name__)�x�r:�/usr/lib/python3.5/typing.py�	_qualnamePsr<csdeZdZdZdZdd�fdd�Zdd�Zdd	�Zd
d�Zdd
�Z	�S)�
TypingMetaa�Metaclass for every type defined below.

    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 (including internal subclasses created by
    e.g.  Union[X, Y]) must pass _root=True.

    This also defines a dummy constructor (all the work is done in
    __new__) and a nicer repr().
    F�_rootcsG|s.tddjtt|��p'd��t�j||||�S)NzCannot subclass %sz, z())�	TypeError�join�map�
_type_repr�super�__new__)�cls�name�bases�	namespacer>)�	__class__r:r;rDgs"zTypingMeta.__new__cOsdS)Nr:)�self�args�kwdsr:r:r;�__init__mszTypingMeta.__init__cCs|S)a+Override this in subclasses to interpret forward references.

        For example, Union['C'] is internally stored as
        Union[_ForwardRef('C')], which should evaluate to _Union[C],
        where C is an object found in globalns or localns (searching
        localns first, of course).
        r:)rJ�globalns�localnsr:r:r;�
_eval_typepszTypingMeta._eval_typecCsdS)Nr:)rJ�tvarsr:r:r;�_get_type_varszszTypingMeta._get_type_varscCsd|jt|�fS)Nz%s.%s)�
__module__r<)rJr:r:r;�__repr__}szTypingMeta.__repr__)
r8rSr7�__doc__�_is_protocolrDrMrPrRrTr:r:)rIr;r=Xs
r=c@s(eZdZdZfZdd�ZdS)�Finalz&Mix-in class to prevent instantiation.cOstd|j��dS)NzCannot instantiate %r)r?rI)rJrKrLr:r:r;rD�sz
Final.__new__N)r8rSr7rU�	__slots__rDr:r:r:r;rW�srWcsXeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Z�S)�_ForwardRefz$Wrapper to hold a forward reference.cst|t�s"td|f��yt|dd�}Wn%tk
r_td|f��YnXt�j||fidd�}||_||_d|_	d|_
t�}tj
d�}x(|dk	r�|j|kr�|j}q�W|dk	s�t�||_|S)	Nz%ForwardRef must be a string -- got %rz<string>�evalz*ForwardRef must be an expression -- got %rr>TF�)�
isinstance�strr?�compile�SyntaxErrorrCrD�__forward_arg__�__forward_code__�__forward_evaluated__�__forward_value__�globalsr5�	_getframe�	f_globals�f_back�AssertionError�__forward_frame__)rE�arg�coderJZtyping_globals�frame)rIr:r;rD�s&
!					
	z_ForwardRef.__new__cCs�t|t�s"td|f��t|t�sDtd|f��|js�|dkrr|dkrri}}n'|dkr�|}n|dkr�|}tt|j||�d�|_d|_|jS)Nz+ForwardRef localns must be a dict -- got %rz,ForwardRef globalns must be a dict -- got %rz*Forward references must evaluate to types.T)r\�dictr?rb�_type_checkrZrarc)rJrNrOr:r:r;rP�s$

	
		z_ForwardRef._eval_typecCstd��dS)Nz4Forward references cannot be used with isinstance().)r?)rJ�objr:r:r;�__instancecheck__�sz_ForwardRef.__instancecheck__cCs^|jsN|jj}|jj}y|j||�Wntk
rMdSYnXt||j�S)NF)rbrirf�f_localsrP�	NameError�
issubclassrc)rJrErNrOr:r:r;�__subclasscheck__�s	
	z_ForwardRef.__subclasscheck__cCsd|jfS)Nz_ForwardRef(%r))r`)rJr:r:r;rT�sz_ForwardRef.__repr__)	r8rSr7rUrDrPrprtrTr:r:)rIr;rY�s
rYc@sdeZdZdZdZdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�
_TypeAliasa�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 can
    be used in instance and subclass checks, e.g. isinstance(m, Match)
    or issubclass(type(m), Match).  However, it cannot be itself the
    target of an issubclass() call; e.g. issubclass(Match, C) (for
    some arbitrary class C) raises TypeError rather than returning
    False.
    rF�type_var�	impl_type�type_checkercOsQt|�dkrDt|dt�rDt|dt�rDtd��tj|�S)z�Constructor.

        This only exists to give a better error message in case
        someone tries to subclass a type alias (not a good idea).
        r4rr[z!A type alias cannot be subclassed)�lenr\r]�tupler?�objectrD)rErKrLr:r:r;rD�s
z_TypeAlias.__new__cCs�t|t�s!tt|���t|t�sBtt|���t|t�sctt|���t|t�s�tt|���||_||_||_||_	dS)atInitializer.

        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)
r\r]rh�repr�typer=rFrvrwrx)rJrFrvrwrxr:r:r;rM�s!!!"			z_TypeAlias.__init__cCsd|jt|j�fS)Nz%s[%s])rFrBrv)rJr:r:r;rT�sz_TypeAlias.__repr__cCs�t|t�s!tt|���t|jt�sCtd|��|jjr�t|t	|jj�s�td||jf��|j
|j||j|j
�S)Nz#%s cannot be further parameterized.z&%s is not a valid substitution for %s.)r\r}rhr|rvr
r?�__constraints__rsrrIrFrwrx)rJZ	parameterr:r:r;�__getitem__�s!z_TypeAlias.__getitem__cCstd��dS)Nz.Type aliases cannot be used with isinstance().)r?)rJror:r:r;rpsz_TypeAlias.__instancecheck__cCsX|tkrdSt|t�rD|j|jkoCt|j|j�St||j�SdS)NT)rr\rurFrsrvrw)rJrEr:r:r;rtsz_TypeAlias.__subclasscheck__N)znameztype_varz	impl_typeztype_checker)r8rSr7rUrXrDrMrTrrprtr:r:r:r;ru�s	
rucCs1x*|D]"}t|t�r|j|�qWdS)N)r\r=rR)�typesrQ�tr:r:r;rRs
rRcCsg}t||�t|�S)N)rRrz)r�rQr:r:r;�
_type_varss
r�cCs't|t�r|j||�S|SdS)N)r\r=rP)r�rNrOr:r:r;rP srPcCso|dkrtd�St|t�r1t|�}t|ttf�rkt|�rkt|d|f��|S)avCheck that the argument is a type, and return it.

    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).
    Nz Got %.100r.)r}r\r]rYru�callabler?)rj�msgr:r:r;rn's
#rncCs`t|t�rRt|t�rR|jdkr8t|�Sd|jt|�fSn
t|�SdS)a)Return the repr() of an object, special-casing types.

    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.%sN)r\r}r=rSr<r|)ror:r:r;rB<s

rBcsIeZdZdZd�fdd�Zdd�Z�fdd�Z�S)	�AnyMetazMetaclass for Any.Fcs%t�j||||d|�}|S)Nr>)rCrD)rErFrGrHr>rJ)rIr:r;rDPs!zAnyMeta.__new__cCstd��dS)Nz%Any cannot be used with isinstance().)r?)rJror:r:r;rpTszAnyMeta.__instancecheck__cs#t|t�st�j|�SdS)NT)r\r}rCrt)rJrE)rIr:r;rtWszAnyMeta.__subclasscheck__)r8rSr7rUrDrprtr:r:)rIr;r�Msr�c@seZdZdZfZdS)rz�Special type indicating an unconstrained type.

    - Any object is an instance of Any.
    - Any class is a subclass of Any.
    - As a special case, Any and object are subclasses of each other.
    N)r8rSr7rUrXr:r:r:r;r]s�	metaclassr>Tc	sjeZdZdZdddddd�fdd�Zd	d
�Zdd�Zd
d�Zdd�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) -> Sequence[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) will raise TypeError.  However,
    issubclass(C, T) is true for any class C, and issubclass(str, A)
    and issubclass(bytes, A) are true, and issubclass(int, A) is
    false.  (TODO: Why is this needed?  This may change.  See #136.)

    Type variables may be marked covariant or contravariant by passing
    covariant=True or contravariant=True.  See PEP 484 for more
    details.  By default type variables are invariant.

    Type variables can be introspected. e.g.:

      T.__name__ == 'T'
      T.__constraints__ == ()
      T.__covariant__ == False
      T.__contravariant__ = False
      A.__constraints__ == (str, bytes)
    �boundN�	covariantF�
contravariantcs�t�j||tfidd�}|r<|r<td��t|�|_t|�|_|rx|dk	rxtd��|r�t|�dkr�td��d�t	�fdd	�|D��|_
|r�t|d
�|_n	d|_|S)Nr>Tz+Bivariant type variables are not supported.z-Constraints cannot be combined with bound=...r[z"A single constraint is not allowedz:TypeVar(name, constraint, ...): constraints must be types.c3s|]}t|��VqdS)N)rn)�.0r�)r�r:r;�	<genexpr>�sz"TypeVar.__new__.<locals>.<genexpr>zBound must be a type.)
rCrDrW�
ValueError�bool�
__covariant__�__contravariant__r?ryrzr~rn�	__bound__)rErFr�r�r�ZconstraintsrJ)rI)r�r;rD�s$"	zTypeVar.__new__cCs||kr|j|�dS)N)�append)rJrQr:r:r;rR�szTypeVar._get_type_varscCs5|jrd}n|jr$d}nd}||jS)N�+�-�~)r�r�r8)rJ�prefixr:r:r;rT�s				zTypeVar.__repr__cCstd��dS)Nz0Type variables cannot be used with isinstance().)r?)rJ�instancer:r:r;rp�szTypeVar.__instancecheck__csl�|krdS�tkr dS|jdk	r?t�|j�S|jrht�fdd�|jD��SdS)NTc3s|]}t�|�VqdS)N)rs)r��c)rEr:r;r��sz,TypeVar.__subclasscheck__.<locals>.<genexpr>)rr�rsr~�any)rJrEr:)rEr;rt�s	 zTypeVar.__subclasscheck__)	r8rSr7rUrDrRrTrprtr:r:)rIr;r
hs*		�T�KT�VT�T_cor��V_co�VT_co�T_contrar�cs�eZdZdZdd�fdd�Zdd�Zdd	�Z�fd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Z�S)�	UnionMetazMetaclass for Union.NFcs2|dkr+t�j||||d|�St|t�sFtd��g}d}xF|D]>}t|t�r�|j|j�qY|jt	||��qYWt
|��t��t|�krg}	x4|D],}
|
�kr�|	j|
��j|
�q�W|	}�st
���t
|��x�|D]���tkr>tSt�t�rPq(t�t�rbq(t�t�s�t��s(t
�q(t�fdd���hD��r(�j��q(Wt��dkr��j�St�j|||idd�}t�fdd�|D��|_t|j�|_|S)	Nr>zExpected parameters=<tuple>z)Union[arg, ...]: each arg must be a type.c3s<|]2}t|t�st|t�o3t�|�VqdS)N)r\r
r}rs)r�Zt2)�t1r:r;r��sz$UnionMeta.__new__.<locals>.<genexpr>r[Tc3s!|]}|�kr|VqdS)Nr:)r�r�)�
all_paramsr:r;r�s)rCrDr\rzr?r��extend�__union_params__r�rn�setry�removerhrr
rur}r�r��pop�	frozenset�__union_set_params__)rErFrGrH�
parametersr>�paramsr��pZ
new_paramsr�rJ)rI)r�r�r;rD�sN




!"zUnionMeta.__new__cs^t��fdd�|jD��}||jkr8|S|j|j|ji|dd�SdS)Nc3s!|]}t|���VqdS)N)rP)r�r�)rNrOr:r;r�sz'UnionMeta._eval_type.<locals>.<genexpr>r>T)rzr�rIr8�	__bases__)rJrNrOr�r:)rNrOr;rPszUnionMeta._eval_typecCs|jrt|j|�dS)N)r�rR)rJrQr:r:r;rRs	zUnionMeta._get_type_varscsCt�j�}|jr?|ddjdd�|jD��7}|S)Nz[%s]z, css|]}t|�VqdS)N)rB)r�r�r:r:r;r�sz%UnionMeta.__repr__.<locals>.<genexpr>)rCrTr�r@)rJ�r)rIr:r;rTs
	zUnionMeta.__repr__cCsv|jdk	rtd��|fkr3td��t|t�sK|f}|j|j|jt|j�|dd�S)Nz<Cannot subscript an existing Union. Use Union[u, t] instead.z Cannot take a Union of no types.r>T)	r�r?r\rzrIr8r�rm�__dict__)rJr�r:r:r;rs		zUnionMeta.__getitem__cCs#t|t�stS|j|jkS)N)r\r��NotImplementedr�)rJ�otherr:r:r;�__eq__*szUnionMeta.__eq__cCs
t|j�S)N)�hashr�)rJr:r:r;�__hash__/szUnionMeta.__hash__cCstd��dS)Nz(Unions cannot be used with isinstance().)r?)rJror:r:r;rp2szUnionMeta.__instancecheck__cs��tkrdS�jdkr,t�t�St�t�rn�jdkrNdSt�fdd��jD��St�t�r���jkr�dS�jr�tt�j��SdSt	�fdd��jD��SdS)NTFc3s|]}t|��VqdS)N)rs)r�r�)rJr:r;r�=sz.UnionMeta.__subclasscheck__.<locals>.<genexpr>c3s|]}t�|�VqdS)N)rs)r�r�)rEr:r;r�Es)
rr�r\r��allr
r~rsrr�)rJrEr:)rErJr;rt5s
 	zUnionMeta.__subclasscheck__)
r8rSr7rUrDrPrRrTrr�r�rprtr:r:)rIr;r��s5	r�c@s"eZdZdZdZdZdS)ra�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

    - Corollary: if Any is present it is the sole survivor, e.g.::

        Union[int, Any] == Any

    - Similar for object::

        Union[int, object] == object

    - To cut a tie: Union[object, Any] == Union[Any, object] == Any.

    - You cannot subclass or instantiate a union.

    - You cannot write Union[X][Y] (what would it mean?).

    - You can use Optional[X] as a shorthand for Union[X, None].
    N)r8rSr7rUr�r�r:r:r:r;rHs2cs7eZdZdZd�fdd�Zdd�Z�S)�OptionalMetazMetaclass for Optional.Fcst�j||||d|�S)Nr>)rCrD)rErFrGrHr>)rIr:r;rD�szOptionalMeta.__new__cCs#t|d�}t|td�fS)Nz#Optional[t] requires a single type.)rnrr})rJrjr:r:r;r�szOptionalMeta.__getitem__)r8rSr7rUrDrr:r:)rIr;r��sr�c@seZdZdZfZdS)rzKOptional type.

    Optional[X] is equivalent to Union[X, type(None)].
    N)r8rSr7rUrXr:r:r:r;r�scs�eZdZdZddd�fdd�Zdd�Zdd	�Z�fd
d�Zdd
�Zdd�Z	dd�Z
dd�Z�fdd�Z�S)�	TupleMetazMetaclass for Tuple.NFcs7t�j||||d|�}||_||_|S)Nr>)rCrD�__tuple_params__�__tuple_use_ellipsis__)rErFrGrHr��use_ellipsisr>rJ)rIr:r;rD�s!		zTupleMeta.__new__cCs|jrt|j|�dS)N)r�rR)rJrQr:r:r;rR�s	zTupleMeta._get_type_varscst|j}|dkr|St��fdd�|D��}||jkrN|S|j|j|ji|dd�SdS)Nc3s!|]}t|���VqdS)N)rP)r�r�)rNrOr:r;r��sz'TupleMeta._eval_type.<locals>.<genexpr>r>T)r�rzrIr8r�)rJrNrO�tpr�r:)rNrOr;rP�s	"zTupleMeta._eval_typecsxt�j�}|jdk	rtdd�|jD�}|jrJ|jd�|s]|jd�|ddj|�7}|S)NcSsg|]}t|��qSr:)rB)r�r�r:r:r;�
<listcomp>�s	z&TupleMeta.__repr__.<locals>.<listcomp>z...z()z[%s]z, )rCrTr�r�r�r@)rJr�r�)rIr:r;rT�s	

zTupleMeta.__repr__c	s�|jdk	r"td|f��t|t�s:|f}t|�dkr{|dtkr{|dd�}d}d�nd}d�t�fdd	�|D��}|j|j|jt	|j
�|d
|dd�S)NzCannot re-parameterize %rr3r[Tz Tuple[t, ...]: t must be a type.Fz*Tuple[t0, t1, ...]: each t must be a type.c3s|]}t|��VqdS)N)rn)r�r�)r�r:r;r��sz(TupleMeta.__getitem__.<locals>.<genexpr>r�r>)r�r?r\rzry�EllipsisrIr8r�rmr�)rJr�r�r:)r�r;r�s	"	zTupleMeta.__getitem__cCs5t|t�stS|j|jko4|j|jkS)N)r\r�r�r�r�)rJr�r:r:r;r��szTupleMeta.__eq__cCs
t|j�S)N)r�r�)rJr:r:r;r��szTupleMeta.__hash__cCstd��dS)Nz(Tuples cannot be used with isinstance().)r?)rJror:r:r;rp�szTupleMeta.__instancecheck__cs�|tkrdSt|t�s/t�j|�St|t�rBdSt|t�sat�j|�S|jdkrtdS|jdkr�dS|j	|j	kr�dSt
|j�t
|j�ko�tdd�t|j|j�D��S)NTFcss$|]\}}t||�VqdS)N)rs)r�r9r�r:r:r;r��sz.TupleMeta.__subclasscheck__.<locals>.<genexpr>)
rr\r}rCrtrsrzr�r�r�ryr��zip)rJrE)rIr:r;rt�s$	zTupleMeta.__subclasscheck__)
r8rSr7rUrDrRrPrTrr�r�rprtr:r:)rIr;r��sr�c@seZdZdZfZdS)ra>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 Sequence[T].
    N)r8rSr7rUrXr:r:r:r;r�scs�eZdZdZddd�fdd�Zdd�Zdd	�Z�fd
d�Zdd
�Zdd�Z	dd�Z
dd�Z�fdd�Z�S)�CallableMetazMetaclass for Callable.FNcs�|dkr|dkrnh|tk	rnt|t�sItd|f��d�t�fdd�|D��}d�t|��}t�j||||d|�}||_||_	|S)Nz8Callable[args, result]: args must be a list. Got %.100r.z6Callable[[arg, ...], result]: each arg must be a type.c3s|]}t|��VqdS)N)rn)r�rj)r�r:r;r�sz'CallableMeta.__new__.<locals>.<genexpr>z.Callable[args, result]: result must be a type.r>)
r�r\�listr?rzrnrCrD�__args__�
__result__)rErFrGrHr>rK�resultrJ)rI)r�r;rD�s
!		zCallableMeta.__new__cCs|jrt|j|�dS)N)r�rR)rJrQr:r:r;rRs	zCallableMeta._get_type_varsc
s�|jdkr"|jdkr"|S|jtkr=|j}n��fdd�|jD�}t|j���}||jkr�||jkr�|S|j|j|jid|d|dd�SdS)Ncs"g|]}t|����qSr:)rP)r�r�)rNrOr:r;r�s	z+CallableMeta._eval_type.<locals>.<listcomp>rKr�r>T)r�r�r�rPrIr8r�)rJrNrOrKr�r:)rNrOr;rPszCallableMeta._eval_typecs�t�j�}|jdk	s-|jdk	r�|jtkrEd}n#ddjdd�|jD��}|d|t|j�f7}|S)Nz...z[%s]z, css|]}t|�VqdS)N)rB)r�r�r:r:r;r�(sz(CallableMeta.__repr__.<locals>.<genexpr>z[%s, %s])rCrTr�r�r�r@rB)rJr�Zargs_r)rIr:r;rT"s	zCallableMeta.__repr__c
Cs�|jdk	s|jdk	r*td��t|t�sLt|�dkrXtd��|\}}|j|j|jt	|j
�ddd|d|�S)Nz,This Callable type is already parameterized.r3z6Callable must be used as Callable[[arg, ...], result].r>TrKr�)r�r�r?r\rzryrIr8r�rmr�)rJr�rKr�r:r:r;r-s"	zCallableMeta.__getitem__cCs5t|t�stS|j|jko4|j|jkS)N)r\r�r�r�r�)rJr�r:r:r;r�8szCallableMeta.__eq__cCst|j�t|j�AS)N)r�r�r�)rJr:r:r;r�>szCallableMeta.__hash__cCs>|jdkr.|jdkr.t|tj�Std��dS)Nz,Callable[] cannot be used with isinstance().)r�r�r\�collections_abcrr?)rJror:r:r;rpAszCallableMeta.__instancecheck__cs[|tkrdSt|t�s/t�j|�S|jdkrQ|jdkrQdS||kS)NT)rr\r�rCrtr�r�)rJrE)rIr:r;rtJszCallableMeta.__subclasscheck__)
r8rSr7rUrDrRrPrTrr�r�rprtr:r:)rIr;r��s	r�c@seZdZdZfZdS)ra�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; 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.
    N)r8rSr7rUrXr:r:r:r;rUs	cCs8t|t�st�x|jdk	r3|j}qW|S)z.Return the farthest origin of a generic class.N)r\�GenericMetarh�
__origin__)�ar:r:r;�_gorgcs
r�cCs:t|t�rt|t�s$t�t|�t|�kS)a%Return whether two generic classes are equivalent.

    The intention is to consider generic class X and any of its
    parameterized forms (X[T], X[int], etc.)  as equivalent.

    However, X is not equivalent to a subclass of X.

    The relation is reflexive, symmetric and transitive.
    )r\r�rhr�)r��br:r:r;�_geqvks
$r�cCsft}xYt|jdd��D]>\}}t|t�r t|�tkr |j|d}q W|S)z�Helper for Generic.__new__.

    Returns the class after the last occurrence of Generic or
    Generic[...] in cls.__mro__.
    Nr[���)r{�	enumerate�__mro__r\r�r�r)rEZnext_in_mro�ir�r:r:r;�_next_in_mrozs
&!r�cs�eZdZdZdddd�fdd�Zdd�Z�fdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
�fdd�Z�S)r�zMetaclass for generic types.Ncs�t�j||||dd�}|dk	rg|dk	s?t�tdd�|D��s�t|��nI|dkst|��|dks�t|��|dks�t|��t|�}d}	xe|D]]}
|
tkr�td��t|
t�r�|
j	tkr�|	dk	rtd��|
j
}	q�W|	dkr>|}	nrt|�}t|	��|�ks�tddj�fd	d�|D��djd
d�|	D��f��|	}||_
||_
||_	||_t|�|_|S)Nr>Tcss|]}t|t�VqdS)N)r\r
)r�r�r:r:r;r��sz&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, c3s'|]}|�krt|�VqdS)N)r])r�r�)�gvarsetr:r;r��scss|]}t|�VqdS)N)r])r��gr:r:r;r��s)rCrDrhr�r�rr?r\r�r��__parameters__r�r@r��	__extra__r��__next_in_mro__)rErFrGrHrQrK�origin�extrarJZgvars�baseZtvarset)rI)r�r;rD�sD!(
	
	#				zGenericMeta.__new__cCs&|jr"|jr"t|j|�dS)N)r�r�rR)rJrQr:r:r;rR�szGenericMeta._get_type_varscs�|jdk	r!t|j�}nt�j�}|jr`|ddjdd�|jD��7}|jr�|ddjdd�|jD��7}|S)Nz[%s]z, css|]}t|�VqdS)N)rB)r�r�r:r:r;r��sz'GenericMeta.__repr__.<locals>.<genexpr>z<%s>css|]}t|�VqdS)N)rB)r�r�r:r:r;r��s)r�r|rCrTr�r@r�)rJr�)rIr:r;rT�s	!	!zGenericMeta.__repr__cCsdt|t�stS|jdk	rV|j|jkoU|j|jkoU|j|jkS||kSdS)N)r\r�r�r�r�r�)rJr�r:r:r;r��szGenericMeta.__eq__cCst|j|jf�S)N)r�r8r�)rJr:r:r;r��szGenericMeta.__hash__cs�t|t�s|f}|s4tdt|���d�t�fdd�|D��}|tkr�tdd�|D��s�td��tt|��t|�kr�td��|}d}n�|tkr�|}d}n�|j	ttfkrtdt
|���n�|js+td	t
|���t|�}t|j�}||kr�td
||krjdndt
|�||f��t|�}|}|j
|j|f|jt|j�d
|d|d|d|j�S)Nz)Parameter list to %s[...] cannot be emptyz*Parameters to generic types must be types.c3s|]}t|��VqdS)N)rn)r�r�)r�r:r;r��sz*GenericMeta.__getitem__.<locals>.<genexpr>css|]}t|t�VqdS)N)r\r
)r�r�r:r:r;r��sz5Parameters to Generic[...] must all be type variablesz-Parameters to Generic[...] must all be uniquez'Cannot subscript already-subscripted %sz%s is not a generic classz0Too %s parameters for %s; actual %s, expected %sZmanyZfewrQrKr�r�)r\rzr?r<rr�ryr��	_Protocolr�r|r�r�rIr8r�rmr�r�)rJr�rQrKZalenZelenr:)r�r;r�sN						.
zGenericMeta.__getitem__cCs|j|j�S)N)rtrI)rJr�r:r:r;rpszGenericMeta.__instancecheck__csj|tkrdSt|t�r"|j}|dk	r"||jkr"t|j�t|j�ksgt�t|j�t|j�ks�t�x�t|j|j|j�D]s\}}}t|t	�r
|j
r�t||�s
Pq|jr�t||�s
Pq||krPq�||kr�Pq�WdSt
�j|�r8dS|jdksVt|t�rZdSt||j�S)NTF)rr\r�r�ryr�r�rhr�r
r�rsr�rCrtr�)rJrEr�Zp_selfZp_clsZp_origin)rIr:r;rts6	$$		zGenericMeta.__subclasscheck__)r8rSr7rUrDrRrTr�r�rrprtr:r:)rIr;r��s3

.r�c@s(eZdZdZfZdd�ZdS)raIAbstract base class for generic types.

    A generic type is typically declared by inheriting from an
    instantiation of this class 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
    cOsU|jdkr|jj|�St|�}|jj|�}|j||�|SdS)N)r�r�rDr�rM)rErKrLr�ror:r:r;rDWszGeneric.__new__N)r8rSr7rUrXrDr:r:r:r;r@scCs|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).
    r:)�typ�valr:r:r;r+asc
Cs�|j}|j}|j}|d|�}|jp7f}|j}|rUt|�ni}|t|�}xCt||d�|�D](\}}	||ks�t�|	||<q�W|S)z:Internal helper to extract the default arguments, by name.N)	�__code__�co_argcount�co_varnames�__defaults__�__kwdefaults__rmryr�rh)
�funcrkZ	pos_countZ	arg_names�defaultsZ
kwdefaultsZresZ
pos_offsetrF�valuer:r:r;�
_get_defaultsls				&r�cCs�t|dd�riS|dkrIt|di�}|dkr[|}n|dkr[|}t|�}t|j�}xw|j�D]i\}}t|t�r�t|�}t|||�}||kr�||dkr�t	|}|||<q�W|S)a>Return type hints for a function or method 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.

    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, and these are also used as the locals.  If the
      object does not appear to have globals, an exception is raised.

    - 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�__globals__)
�getattrr�rm�__annotations__�itemsr\r]rYrPr)rorNrOr�ZhintsrFr�r:r:r;r,|s$	
cCsTt|t�rGx>|jj�D]!}t|tj�rd|_qWn	d|_|S)a0Decorator 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 defined in that class (but not
    to methods defined in its superclasses or subclasses).

    This mutates the function(s) in place.
    T)r\r}r��valuesr��FunctionTyper�)rjror:r:r;r.�s		cs%tj���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.
    cs�||�}t|�}|S)N)r.)rKrLr�)�	decoratorr:r;�wrapped_decorator�sz2no_type_check_decorator.<locals>.wrapped_decorator)�	functools�wraps)r�r�r:)r�r;r/�s!cOstd��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)rKrLr:r:r;�_overload_dummy�sr�cCstS)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
    )r�)r�r:r:r;r0�sc@s:eZdZdZdd�Zdd�Zdd�ZdS)	�
_ProtocolMetaz~Internal metaclass for _Protocol.

    This exists so _Protocol classes can be generic without deriving
    from Generic.
    cCstd��dS)Nz+Protocols cannot be used with isinstance().)r?)rJror:r:r;rp�sz_ProtocolMeta.__instancecheck__csd|js
tS|tkrdS|j�}x4|D],�t�fdd�|jD��s0dSq0WdS)NTc3s|]}�|jkVqdS)N)r�)r��d)�attrr:r;r�sz2_ProtocolMeta.__subclasscheck__.<locals>.<genexpr>F)rVr�r��_get_protocol_attrsr�r�)rJrE�attrsr:)r�r;rt�s	
"z_ProtocolMeta.__subclasscheck__cCsdg}x?|jD]4}t|dd�r|jdkr|j|�qWt�}x|D]}x�|jj�D]�}x�|jD]5}||k	r~||jkr~t|dd�r~Pq~W|jd�rn|dkrn|dkrn|dkrn|dkrn|dkrn|d	krn|d
krn|dkrn|dkrn|d
krn|dkrn|j|�qnWqXW|S)NrVFr��_abc_�__abstractmethods__r�r�rXr�r�r�r�r�rS)	r�r�r8r�r�r��keys�
startswith�add)rJZprotocol_basesr�r�r�r�r:r:r;r�s2!	
z!_ProtocolMeta._get_protocol_attrsN)r8rSr7rUrprtr�r:r:r:r;r��sr�c@s"eZdZdZfZdZdS)r�z�Internal base class for protocol classes.

    This implements a simple-minded structural isinstance check
    (similar but more general than the one-offs in collections.abc
    such as Hashable).
    TN)r8rSr7rUrXrVr:r:r:r;r�*sr�c@seZdZfZdS)r
N)r8rSr7rXr:r:r:r;r
>sr�c@seZdZfZdS)rN)r8rSr7rXr:r:r:r;rFsc@seZdZfZdS)rN)r8rSr7rXr:r:r:r;rIsc@seZdZfZdS)rN)r8rSr7rXr:r:r:r;rRsc@seZdZfZdS)rN)r8rSr7rXr:r:r:r;rVsc@s1eZdZfZeeddd���ZdS)r")�returncCsdS)Nr:)rJr:r:r;�__int__]szSupportsInt.__int__N)r8rSr7rXr�intr�r:r:r:r;r"Zsc@s1eZdZfZeeddd���ZdS)r!)r�cCsdS)Nr:)rJr:r:r;�	__float__eszSupportsFloat.__float__N)r8rSr7rXr�floatr�r:r:r:r;r!bsc@s1eZdZfZeeddd���ZdS)�SupportsComplex)r�cCsdS)Nr:)rJr:r:r;�__complex__mszSupportsComplex.__complex__N)r8rSr7rXr�complexrr:r:r:r;rjsrc@s1eZdZfZeeddd���ZdS)�
SupportsBytes)r�cCsdS)Nr:)rJr:r:r;�	__bytes__uszSupportsBytes.__bytes__N)r8rSr7rXr�bytesrr:r:r:r;rrsrc@s1eZdZfZeeddd���ZdS)r )r�cCsdS)Nr:)rJr:r:r;�__abs__}szSupportsAbs.__abs__N)r8rSr7rXrr�rr:r:r:r;r zsc@s7eZdZfZedeeddd���ZdS)r#r)�ndigitsr�cCsdS)Nr:)rJrr:r:r;�	__round__�szSupportsRound.__round__N)r8rSr7rXrr�r�r	r:r:r:r;r#�sc@seZdZfZdS)rN)r8rSr7rXr:r:r:r;r�sc@s1eZdZfZedddd���ZdS)rzIterator[T_co])r�cCsdS)Nr:)rJr:r:r;�__reversed__�szReversible.__reversed__N)r8rSr7rXrr
r:r:r:r;r�sc@seZdZfZdS)rN)r8rSr7rXr:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�s�c@seZdZdd�ZdS)r&cOs.t|t�rtd��tj|||�S)Nz4Type List cannot be instantiated; use list() instead)r�r&r?r�rD)rErKrLr:r:r;rD�szList.__new__N)r8rSr7rDr:r:r:r;r&�sc@seZdZdd�ZdS)r'cOs.t|t�rtd��tj|||�S)Nz2Type Set cannot be instantiated; use set() instead)r�r'r?r�rD)rErKrLr:r:r;rD�szSet.__new__N)r8rSr7rDr:r:r:r;r'�scs(eZdZdZ�fdd�Z�S)�_FrozenSetMetaz�This metaclass ensures set is not a subclass of FrozenSet.

    Without this metaclass, set would be considered a subclass of
    FrozenSet, because FrozenSet.__extra__ is collections.abc.Set, and
    set is a subclass of that.
    cs#t|t�rdSt�j|�S)NF)rsr'rCrt)rJrE)rIr:r;rt�sz _FrozenSetMeta.__subclasscheck__)r8rSr7rUrtr:r:)rIr;r�src@s"eZdZfZdd�ZdS)�	FrozenSetcOs.t|t�rtd��tj|||�S)Nz>Type FrozenSet cannot be instantiated; use frozenset() instead)r�r
r?r�rD)rErKrLr:r:r;rD�szFrozenSet.__new__N)r8rSr7rXrDr:r:r:r;r
�sr
c@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;r�sc@seZdZdS)rN)r8rSr7r:r:r:r;rs�AbstractContextManagerc@seZdZfZdS)�ContextManagerN)r8rSr7rXr:r:r:r;rsrc@seZdZdd�ZdS)r$cOs.t|t�rtd��tj|||�S)Nz4Type Dict cannot be instantiated; use dict() instead)r�r$r?rmrD)rErKrLr:r:r;rDszDict.__new__N)r8rSr7rDr:r:r:r;r$sc@seZdZdd�ZdS)r%cOs1t|t�rtd��tjj|||�S)NzNType DefaultDict cannot be instantiated; use collections.defaultdict() instead)r�r%r?�collections�defaultdictrD)rErKrLr:r:r;rDszDefaultDict.__new__N)r8rSr7rDr:r:r:r;r%scs(eZdZfZ�fdd�Z�S)r)cs1t|t�rtd��t�j|||�S)Nz@Type Generator cannot be instantiated; create a subclass instead)r�r)r?rCrD)rErKrL)rIr:r;rD*szGenerator.__new__)r8rSr7rXrDr:r:)rIr;r)&s�CTr�c@seZdZdZdS)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)r8rSr7rUr:r:r:r;r	6scCs�dd�|D�}tj|dd�|D��}t|�|_y%tjd�jjdd�|_Wnt	t
fk
r�YnX|S)a�Typed version of namedtuple.

    Usage::

        Employee = typing.NamedTuple('Employee', [('name', str), 'id', int)])

    This is equivalent to::

        Employee = collections.namedtuple('Employee', ['name', 'id'])

    The resulting class has one extra attribute: _field_types,
    giving a dict mapping field names to types.  (The field names
    are in the _fields attribute, which is part of the namedtuple
    API.)
    cSs"g|]\}}||f�qSr:r:)r��nr�r:r:r;r�_s	zNamedTuple.<locals>.<listcomp>cSsg|]\}}|�qSr:r:)r�rr�r:r:r;r�`s	r[r8�__main__)r�
namedtuplermZ_field_typesr5rerf�getrS�AttributeErrorr�)�typenameZfieldsrEr:r:r;r(Os%cCs"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
    cSs|S)Nr:)r9r:r:r;�new_type}szNewType.<locals>.new_type)r8Z
__supertype__)rFr�rr:r:r;r-js		Fc@sgeZdZdZfZeeddd���Zeeddd���Ze	dddd	���Z
e	edd
d���Ze	e
ddd
���Ze	dddd���Ze	eddd���Ze	d6e
eddd���Ze	eddd���Ze	d7e
eddd���Ze	d8e
eeddd���Ze	de
e
e
dd d!���Ze	edd"d#���Ze	e
dd$d%���Ze	de
e
d&d'd(���Ze	edd)d*���Ze	ee
d+d,d-���Ze	eedd.d/d0���Ze	d1dd2d3���Ze	ddd4d5���ZdS)9�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�cCsdS)Nr:)rJr:r:r;�mode�szIO.modecCsdS)Nr:)rJr:r:r;rF�szIO.nameNcCsdS)Nr:)rJr:r:r;�close�szIO.closecCsdS)Nr:)rJr:r:r;�closed�sz	IO.closedcCsdS)Nr:)rJr:r:r;�fileno�sz	IO.filenocCsdS)Nr:)rJr:r:r;�flush�szIO.flushcCsdS)Nr:)rJr:r:r;�isatty�sz	IO.isattyr[)rr�cCsdS)Nr:)rJrr:r:r;�read�szIO.readcCsdS)Nr:)rJr:r:r;�readable�szIO.readable)�limitr�cCsdS)Nr:)rJr#r:r:r;�readline�szIO.readline)�hintr�cCsdS)Nr:)rJr%r:r:r;�	readlines�szIO.readlinesr)�offset�whencer�cCsdS)Nr:)rJr'r(r:r:r;�seek�szIO.seekcCsdS)Nr:)rJr:r:r;�seekable�szIO.seekablecCsdS)Nr:)rJr:r:r;�tell�szIO.tell)�sizer�cCsdS)Nr:)rJr,r:r:r;�truncate�szIO.truncatecCsdS)Nr:)rJr:r:r;�writable�szIO.writable)�sr�cCsdS)Nr:)rJr/r:r:r;�write�szIO.write)�linesr�cCsdS)Nr:)rJr1r:r:r;�
writelines�sz
IO.writelinesz
IO[AnyStr]cCsdS)Nr:)rJr:r:r;�	__enter__�szIO.__enter__cCsdS)Nr:)rJr}r��	tracebackr:r:r;�__exit__�szIO.__exit__r�r�r�) r8rSr7rUrXrr]rrFrrr�rr�rrr r*r!r"r$r&r&r)r*r+r-r.r0r2r3r5r:r:r:r;r�sT"!rc@s_eZdZdZfZeeeefe	ddd���Z
edddd���ZdS)	�BinaryIOz5Typed version of the return of open() in binary mode.)r/r�cCsdS)Nr:)rJr/r:r:r;r0�szBinaryIO.write)r�cCsdS)Nr:)rJr:r:r;r3�szBinaryIO.__enter__N)r8rSr7rUrXrrr�	bytearrayr�r0r3r:r:r:r;r6�s%r6c@s�eZdZdZfZeeddd���Zeeddd���Z	eeddd���Z
eedd	d
���Zee
ddd���Zeddd
d���ZdS)�TextIOz3Typed version of the return of open() in text mode.)r�cCsdS)Nr:)rJr:r:r;�buffersz
TextIO.buffercCsdS)Nr:)rJr:r:r;�encodingszTextIO.encodingcCsdS)Nr:)rJr:r:r;�errorssz
TextIO.errorscCsdS)Nr:)rJr:r:r;�line_bufferingszTextIO.line_bufferingcCsdS)Nr:)rJr:r:r;�newlinesszTextIO.newlinescCsdS)Nr:)rJr:r:r;r3szTextIO.__enter__N)r8rSr7rUrXrr6r9r]r:r;r�r<rr=rr3r:r:r:r;r8�sr8c@s7eZdZdZdddgZeZeZeZdS)�ioz)Wrapper namespace for IO generic classes.rr8r6N)r8rSr7rU�__all__rr8r6r:r:r:r;r>s
r>z.io�Pattern�cCs|jS)N)�pattern)r�r:r:r;�<lambda>&srC�MatchcCs
|jjS)N)�rerB)�mr:r:r;rC(sc@s.eZdZdZddgZeZeZdS)rEz&Wrapper namespace for re type aliases.r@rDN)r8rSr7rUr?r@rDr:r:r:r;rE+srEz.re)|�abcrrr�
contextlibr�rEZ	stdlib_rer5r��collections.abcr��ImportErrorr?r<r}r=rWrYrurRr�rPrnrBr�rr
r�r�r�r�r�r�r�rr]r*r�rr�rr�rr�rr�r�r��ABCMetar�rr+r�r,r.r/r�r0r�r�r�hasattrr
rrrrr"r!rrr r#rrrr'rrrrrrr�r�register�
memoryviewr�r&r�rr�r
rrrrrrr�rmr$rr%r)Z_G_base�
GeneratorTyperr	r(r-r1r2rr6r8r>r8�modulesr^r@�matchrDr:r:r:r;�<module>sl
	)	=M""^u"9"	X"
["�!)	=	&###&	#!#.)!!###	#	 	
&##
)#		'	#`



Zerion Mini Shell 1.0