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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/lib/python3.9/__pycache__/
Upload File :
Current File : //lib/python3.9/__pycache__/typing.cpython-39.pyc
a

�RLg$�@s�dZddlmZmZddlZddlZddlZddlZddlZddl	Z
ddlZddlZddlm
Z
mZmZmZgd�Zdd�Zd�d	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�ZgZd�dd�dd�Ze�fdd�ZGdd�d�ZGdd �d �ZGd!d"�d"edd#�Z Gd$d%�d%e dd#�Z!e d&d'��Z"e d(d)��Z#e d*d+��Z$e d,d-��Z%e d.d/��Z&e d0d1��Z'e!d2d3��Z(Gd4d5�d5edd#�Z)Gd6d7�d7eedd#�Z*d8d9�Z+Gd:d;�d;edd#�Z,Gd<d=�d=e,dd#�Z-Gd>d?�d?e,dd#�Z.Gd@dA�dAe-dd#�Z/GdBdC�dCe.dd#�Z0GdDdE�dEe.dd#�Z1GdFdG�dGe-dd#�Z2dHdI�Z3GdJdK�dKe-dd#�Z4GdLdM�dM�Z5GdNdO�dO�Z6GdPdQ�dQ�Z7gdR�Z8gdS�Z9e8e9dTgZ:dUdV�Z;dWdX�Z<dYdZ�Z=d[d\�Z>gd]�d^d_gd`�Z?Gdadb�dbe�Z@Gdcdd�dde5e@de�ZAGdfdg�dge-dd#�ZBGdhdi�di�ZCdjdk�ZDdldm�ZEdndo�ZFejGejHejIejJe
eefZKd�dpdq�ZLdrds�ZMdtdu�ZNdvdw�ZOdxdy�ZPdzd{�ZQd|d}�ZRd~d�ZSd�d��ZTe*d��ZUe*d��ZVe*d��ZWe*d�dd��ZXe*d�dd��ZYe*d�dd��ZZe*d�dd��Z[e*d�de\d��Z]e*d�e^e_�Z`e.Zaeaejjbd�Zbeaejjcd��Zceaejjdd��Zdeaejjed��Zeeaejjfd��Zfeaejjgd��Zgeaejjhd��Zheaejjid��Zieaejjjd�Zjeaejjkd��Zkeaejjld��Zle0ejjmd��Zmd�em_eaejjnd�d�d��Zoeaejjpd��Zpeaejjqd��Zqeaejjrd��Zreaejjsd��Zseaejjtd��Zteaejjud�Zue1evd�dd�d��Zwd�ew_eaexd�dd�d��Zyeaejzd�d�d��Z{eae|d�dd�d��Zneaed�dd�d��Z}eaejj~d��Z~eaejjd��Zeaejj�d��Z�eaejj�d��Z�eaej�d�d�d��Z�eaej�d�d�d��Z�eae�d�dd�d��Z�eaej�d�d�d��Z�eaej�d��Z�eaej�d��Z�eaej�d��Z�eaejj�d��Z�eaejj�d��Z�eae\d�dd�d��Z�d�e�_eDGd�d��d�eA��Z�eDGd�d��d�eA��Z�eDGd�d��d�eA��Z�eDGd�d��d�eA��Z�eDGd�d��d�eA��Z�eDGd�d��d�eAeX��Z�eDGd�d��d�eAeX��Z�d�d�d��Z�ehd���Z�ehd���Z�Gd�d��d�e\�Z�d�d�d��Z�e\��e�d�d�i�Z�d�d��Z�e�e�_�Gd�d��d�e\�Z�d�dd��d�d��Z�e\��e�d�d�i�Z�d�d��e�_�d�dÄZ�e_Z�dZ�Gd�dńd�e5e`�Z�Gd�dDŽd�e�e^�Z�Gd�dɄd�e�e_�Z�Gd�d˄d˃Z�e�d�e�_�e�ej�e�j�<eae
j�d��Z�eae
j�d��Z�Gd�d΄d΃Z	e�d�e	_�e	ej�e	j�<dS)�a=
The typing module: Support for gradual typing as defined by PEP 484.

At large scale, the structure of the module is following:
* Imports and exports, all public names should be explicitly added to __all__.
* Internal helper functions: these should never be used in code outside this module.
* _SpecialForm and its instances (special forms): Any, NoReturn, ClassVar, Union, Optional
* Two classes whose instances can be type arguments in addition to types: ForwardRef and TypeVar
* The core of internal generics API: _GenericAlias and _VariadicGenericAlias, the latter is
  currently only used by Tuple and Callable. All subscripted types like X[int], Union[int, str],
  etc., are instances of either of these classes.
* The public counterpart of the generics API consists of two classes: Generic and Protocol.
* Public helper functions: get_type_hints, overload, cast, no_type_check,
  no_type_check_decorator.
* Generic aliases for collections.abc ABCs and few additional protocols.
* Special types: NewType, NamedTuple, TypedDict.
* Wrapper submodules for re and io related types.
�)�abstractmethod�ABCMetaN)�WrapperDescriptorType�MethodWrapperType�MethodDescriptorType�GenericAlias)H�	Annotated�Any�Callable�ClassVar�Final�
ForwardRef�Generic�Literal�Optional�Protocol�Tuple�Type�TypeVar�Union�AbstractSet�
ByteString�	Container�ContextManager�Hashable�	ItemsView�Iterable�Iterator�KeysView�Mapping�MappingView�MutableMapping�MutableSequence�
MutableSet�Sequence�Sized�
ValuesView�	Awaitable�
AsyncIterator�
AsyncIterable�	Coroutine�
Collection�AsyncGenerator�AsyncContextManager�
Reversible�SupportsAbs�
SupportsBytes�SupportsComplex�
SupportsFloat�
SupportsIndex�SupportsInt�
SupportsRound�ChainMap�Counter�Deque�Dict�DefaultDict�List�OrderedDict�Set�	FrozenSet�
NamedTuple�	TypedDict�	Generator�AnyStr�cast�final�get_args�
get_origin�get_type_hints�NewType�
no_type_check�no_type_check_decorator�NoReturn�overload�runtime_checkable�Text�
TYPE_CHECKINGcCs&|durtd�St|t�r"t|�S|S)z=For converting None to type(None), and strings to ForwardRef.N)�type�
isinstance�strr
)�arg�rT�/usr/lib/python3.9/typing.py�
_type_convertys

rVTcCs�ttf}|r|ttf}t|�}t|t�rB|j|vrBt|�d���|t	t
fvrR|St|t�sh|ttfvrxtd|�d���t|tt
tf�r�|St|�s�t|�d|d�d���|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 wrap strings
    into ForwardRef instances. Consider several corner cases, for example plain
    special forms like Union are not valid, while Union[int, str] is OK, etc.
    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).
    z is not valid as type argumentzPlain z Got z.100�.)rrrrrVrQ�
_GenericAlias�
__origin__�	TypeErrorr	rK�_SpecialFormrPrr
�callable)rS�msg�is_argument�invalid_generic_formsrTrTrU�_type_check�s"
�r`cCsft|tj�rt|�St|t�r@|jdkr.|jS|j�d|j��S|durLdSt|tj�r^|jSt|�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).
    �builtinsrW.z...)	rQ�typesr�reprrP�
__module__�__qualname__�FunctionType�__name__)�objrTrTrU�
_type_repr�s

ricsZg�|D]H}t|t�r(|�vr(��|�t|ttf�r���fdd�|jD��qt��S)z�Collect all type variable contained in types in order of
    first appearance (lexicographic order). For example::

        _collect_type_vars((T, List[S, T])) == (T, S)
    csg|]}|�vr|�qSrTrT��.0�t��tvarsrTrU�
<listcomp>��z&_collect_type_vars.<locals>.<listcomp>)rQr�appendrXr�extend�__parameters__�tuple)rbrlrTrmrU�_collect_type_vars�s
ruc	CsR|st|�d���t|�}||krNtd||kr2dnd�d|�d|�d|����dS)	z�Check correct count for parameters of a generic cls (internal helper).
    This gives a nice error message in case of count mismatch.
    z is not a generic classzToo �many�fewz parameters for z	; actual z, expected N)rZ�len)�cls�
parameters�elen�alenrTrTrU�_check_generic�s��r}cCsVt|�}t|�t|�krRg}|D] }||vr |�|�|�|�q |}|rRJ|��|S�N)�setrxrq�remove)�params�
all_params�
new_paramsrlrTrTrU�_deduplicate�s
r�cCsrg}|D]\}t|t�r$|�|j�qt|t�rZt|�dkrZ|dturZ|�|dd��q|�|�qtt|��S)zyAn internal helper for Union creation and substitution: flatten Unions
    among parameters, then remove duplicates.
    r�N)	rQ�_UnionGenericAliasrr�__args__rtrxrrqr��rzr��prTrTrU�_remove_dups_flatten�s
"r�cCs8g}|D]&}t|t�r$|�|j�q|�|�qt|�S)zJAn internal helper for Literal creation: flatten Literals among parameters)rQ�_LiteralGenericAliasrrr�rqrtr�rTrTrU�_flatten_literal_params�s
r�F��typedcs �fdd�}|dur||�S|S)zInternal wrapper caching __getitem__ of generic types with a fallback to
    original function for non-hashable arguments.
    cs8tj�d����t��j�t�����fdd��}|S)Nr�cs2z�|i|��WSty"Yn0�|i|��Sr~�rZ��args�kwds��cached�funcrTrU�inners
z+_tp_cache.<locals>.decorator.<locals>.inner)�	functools�	lru_cache�	_cleanupsrq�cache_clear�wraps)r�r�r�r�rU�	decorators
z_tp_cache.<locals>.decoratorNrT)r�r�r�rTr�rU�	_tp_cache�s
r�cstt|t�r|�����St|ttf�rpt���fdd�|jD��}||jkrP|St|t�rft|j|�S|�|�S|S)z�Evaluate all forward references in the given type t.
    For use of globalns and localns see the docstring for get_type_hints().
    recursive_guard is used to prevent prevent infinite recursion
    with recursive ForwardRef.
    c3s|]}t|����VqdSr~)�
_eval_type�rk�a��globalns�localns�recursive_guardrTrU�	<genexpr>rpz_eval_type.<locals>.<genexpr>)	rQr
�	_evaluaterXrrtr�rY�	copy_with)rlr�r�r��ev_argsrTr�rUr�s



r�c@seZdZdZdZdd�ZdS)�_FinalzMixin to prohibit subclassing)�__weakref__cOsd|vrtd��dS)N�_rootz&Cannot subclass special typing classesr���selfr�r�rTrTrU�__init_subclass__,sz_Final.__init_subclass__N)rgrdre�__doc__�	__slots__r�rTrTrTrUr�'sr�c@s$eZdZdZdZdd�Zdd�ZdS)�
_Immutablez3Mixin to indicate that object should not be copied.rTcCs|Sr~rT�r�rTrTrU�__copy__4sz_Immutable.__copy__cCs|Sr~rT)r��memorTrTrU�__deepcopy__7sz_Immutable.__deepcopy__N)rgrdrer�r�r�r�rTrTrTrUr�0sr�c@sTeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
edd��ZdS)r[)�_namer��_getitemcCs||_|j|_|j|_dSr~)r�rgr�r�)r��getitemrTrTrU�__init__@sz_SpecialForm.__init__cCstd|����dS)NzCannot subclass r�)r��basesrTrTrU�__mro_entries__Esz_SpecialForm.__mro_entries__cCs
d|jS�N�typing.�r�r�rTrTrU�__repr__Hsz_SpecialForm.__repr__cCs|jSr~r�r�rTrTrU�
__reduce__Ksz_SpecialForm.__reduce__cOstd|����dS)NzCannot instantiate r�r�rTrTrU�__call__Nsz_SpecialForm.__call__cCst|�d���dS)Nz! cannot be used with isinstance()r��r�rhrTrTrU�__instancecheck__Qsz_SpecialForm.__instancecheck__cCst|�d���dS)Nz! cannot be used with issubclass()r��r�ryrTrTrU�__subclasscheck__Tsz_SpecialForm.__subclasscheck__cCs|�||�Sr~�r��r�rzrTrTrU�__getitem__Wsz_SpecialForm.__getitem__N)
rgrdrer�r�r�r�r�r�r�r�r�r�rTrTrTrUr[=sr[)r�c@seZdZedd�dd��ZdS)�_LiteralSpecialFormTr�cCs|�||�Sr~r�r�rTrTrUr�]sz_LiteralSpecialForm.__getitem__N�rgrdrer�r�rTrTrTrUr�\sr�cCst|�d���dS)a`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.
    � is not subscriptableNr�r�rTrTrUr	bsr	cCst|�d���dS)aSpecial 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.
    r�Nr�r�rTrTrUrKps
rKcCst||�d��}t||f�S)a3Special 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().
    � accepts only single type.�r`rX�r�rz�itemrTrTrUrsrcCst||�d��}t||f�S)a�Special typing construct to indicate final names to type checkers.

    A final name cannot be re-assigned or overridden in a subclass.
    For example:

      MAX_SIZE: Final = 9000
      MAX_SIZE += 1  # Error reported by type checker

      class Connection:
          TIMEOUT: Final[int] = 10

      class FastConnector(Connection):
          TIMEOUT = 1  # Error reported by type checker

    There is no runtime checking of these properties.
    r�r�r�rTrTrUr�srcs`|dkrtd��t|t�s |f}d�t�fdd�|D��}t|�}t|�dkrV|dSt||�S)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]

    - You cannot subclass or instantiate a union.
    - You can use Optional[X] as a shorthand for Union[X, None].
    rTz Cannot take a Union of no types.z)Union[arg, ...]: each arg must be a type.c3s|]}t|��VqdSr~�r`�rkr��r]rTrUr��rpzUnion.<locals>.<genexpr>r�r)rZrQrtr�rxr�r�rTr�rUr�s
rcCs t||�d��}t|td�fS)zEOptional type.

    Optional[X] is equivalent to Union[X, None].
    z requires a single type.N)r`rrP)r�rzrSrTrTrUr�srcCsXt|t�s|f}t|�}z"tdd�ttt|���D��}WntyLYn0t||�S)a�Special typing form to define literal types (a.k.a. value types).

    This form can be used to indicate to type checkers that the corresponding
    variable or function parameter has a value equivalent to the provided
    literal (or one of several literals):

      def validate_simple(data: Any) -> Literal[True]:  # always returns True
          ...

      MODE = Literal['r', 'rb', 'w', 'wb']
      def open_helper(file: str, mode: MODE) -> str:
          ...

      open_helper('/some/path', 'r')  # Passes type check
      open_helper('/other/path', 'typo')  # Error in type checker

    Literal[...] cannot be subclassed. At runtime, an arbitrary value
    is allowed as type argument to Literal[...], but type checkers may
    impose restrictions.
    css|]\}}|VqdSr~rT)rkr��_rTrTrUr��rpzLiteral.<locals>.<genexpr>)rQrtr�r��list�_value_and_type_iterrZr�r�rTrTrUr�s
"rc@s>eZdZdZdZddd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)r
z-Internal wrapper to hold a forward reference.)�__forward_arg__�__forward_code__�__forward_evaluated__�__forward_value__�__forward_is_argument__TcCslt|t�std|����zt|dd�}Wn tyHtd|����Yn0||_||_d|_d|_||_	dS)Nz*Forward reference must be a string -- got z<string>�evalz/Forward reference must be an expression -- got F)
rQrRrZ�compile�SyntaxErrorr�r�r�r�r�)r�rSr^�coderTrTrUr�s
zForwardRef.__init__cCs�|j|vr|S|jr||ur�|dur6|dur6i}}n|durD|}n|durP|}tt|j||�d|jd�}t|||||jhB�|_d|_|jS)Nz*Forward references must evaluate to types.�r^T)r�r�r`r�r�r�r�r�)r�r�r�r��type_rTrTrUr�s&

��zForwardRef._evaluatecCs>t|t�stS|jr2|jr2|j|jko0|j|jkS|j|jkSr~)rQr
�NotImplementedr�r�r��r��otherrTrTrU�__eq__%s

�zForwardRef.__eq__cCs
t|j�Sr~)�hashr�r�rTrTrU�__hash__-szForwardRef.__hash__cCsd|j�d�S)NzForwardRef(�))r�r�rTrTrUr�0szForwardRef.__repr__N)T)
rgrdrer�r�r�r�r�r�r�rTrTrTrUr
�s

r
c@s6eZdZdZdZdddd�dd�Zdd	�Zd
d�ZdS)ra�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 to 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)

    Note that only type variables defined in global scope can be pickled.
    )rg�	__bound__�__constraints__�
__covariant__�__contravariant__�__dict__NF)�bound�	covariant�
contravariantc	s�||_|r|rtd��t|�|_t|�|_|r>|dur>td��|rVt|�dkrVtd��d�t�fdd�|D��|_|r�t	|d�|_
nd|_
zt�d�j
�d	d
�}Wnttfy�d}Yn0|dkr�||_dS)Nz"Bivariant types are not supported.z-Constraints cannot be combined with bound=...r�z"A single constraint is not allowedz:TypeVar(name, constraint, ...): constraints must be types.c3s|]}t|��VqdSr~r�rjr�rTrUr�orpz#TypeVar.__init__.<locals>.<genexpr>zBound must be a type.rg�__main__�typing)rg�
ValueError�boolr�r�rZrxrtr�r`r��sys�	_getframe�	f_globals�get�AttributeErrorrd)r��namer�r�r��constraints�def_modrTr�rUr�cs(


zTypeVar.__init__cCs&|jrd}n|jrd}nd}||jS)N�+�-�~)r�r�rg)r��prefixrTrTrUr�{szTypeVar.__repr__cCs|jSr~)rgr�rTrTrUr��szTypeVar.__reduce__)rgrdrer�r�r�r�r�rTrTrTrUr4s+�	rcCs|�d�o|�d�S)N�__)�
startswith�endswith)�attrrTrTrU�
_is_dunder�srcsXeZdZdZddd�dd�Zdd�Zd	d
�Zdd�Z�fd
d�Zdd�Z	dd�Z
�ZS)�_BaseGenericAliasa�The central part of internal API.

    This represents a generic version of type 'origin' with type arguments 'params'.
    There are two kind of these aliases: user defined and special. The special ones
    are wrappers around builtin collections and ABCs in collections.abc. These must
    have 'name' always set. If 'inst' is False, then the alias can't be instantiated,
    this is used by e.g. typing.List and typing.Dict.
    TN��instr�cCs||_||_||_d|_dSr~)�_instr�rYr�)r��originrr�rTrTrUr��sz_BaseGenericAlias.__init__cOsT|js"td|j�d|jj�d���|j|i|��}z
||_WntyNYn0|S)NzType z cannot be instantiated; use z
() instead)rrZr�rYrg�__orig_class__r�)r�r��kwargs�resultrTrTrUr��s�

z_BaseGenericAlias.__call__cCsdg}|j|vr|�|j�|�|�}||dd�D]}t|t�sLt|t�r4q\q4|�t�t|�S)Nr�)rYrq�indexrQr�
issubclassrrt)r�r��res�i�brTrTrUr��s


z!_BaseGenericAlias.__mro_entries__cCs*d|jvrt|�st|j|�St|��dS)NrY)r�r�getattrrYr�)r�rrTrTrU�__getattr__�sz_BaseGenericAlias.__getattr__cs2t|�s|dvr t��||�nt|j||�dS)N)r�r�_nparams)r�super�__setattr__�setattrrY)r�r�val��	__class__rTrUr�sz_BaseGenericAlias.__setattr__cCs|�t|��Sr~)r�rPr�rTrTrUr��sz#_BaseGenericAlias.__instancecheck__cCstd��dS)NzBSubscripted generics cannot be used with class and instance checksr�r�rTrTrUr��sz#_BaseGenericAlias.__subclasscheck__)rgrdrer�r�r�r�rrr�r��
__classcell__rTrTrrUr�srcsdeZdZddd��fdd�
Zdd�Zdd	�Zed
d��Zdd
�Zdd�Z	dd�Z
�fdd�Z�ZS)rXTNrcsPt�j|||d�t|t�s"|f}tdd�|D��|_t|�|_|sL|j|_dS)Nrcss*|]"}|turdn|turdn|VqdS).rTN)�_TypingEllipsis�_TypingEmptyr�rTrTrUr��s�z)_GenericAlias.__init__.<locals>.<genexpr>)rr�rQrtr�rursrd)r�r	r�rr�rrTrUr��s
�

z_GenericAlias.__init__cCs&t|t�stS|j|jko$|j|jkSr~)rQrXr�rYr�r�rTrTrUr��s


�z_GenericAlias.__eq__cCst|j|jf�Sr~)r�rYr�r�rTrTrUr��sz_GenericAlias.__hash__cs�|jttfvrtd|����t|t�s,|f}d�t�fdd�|D��}t||t|j��t	t
|j|���g}|jD]X}t|t�r��|}n6t|t
tf�r�|j}|r�t�fdd�|D��}||}|�|�qr|�t|��S)Nz%Cannot subscript already-subscripted �*Parameters to generic types must be types.c3s|]}t|��VqdSr~r�r�r�rTrUr��rpz,_GenericAlias.__getitem__.<locals>.<genexpr>c3s|]}�|VqdSr~rT)rk�x)�substrTrUr��rp)rYrrrZrQrtr}rxrs�dict�zipr�rrXrrqr�)r�r��new_argsrS�	subparams�subargsrT)r]r rUr��s&



z_GenericAlias.__getitem__cCs|j|j||j|jd�S�N)r�r)rrYr�r�r�r�rTrTrUr��sz_GenericAlias.copy_withcCsB|jrd|j}n
t|j�}d�dd�|jD��}|�d|�d�S)Nr��, cSsg|]}t|��qSrT�rir�rTrTrUrorpz*_GenericAlias.__repr__.<locals>.<listcomp>�[�])r�rirY�joinr�)r�r�r�rTrTrUr�s

z_GenericAlias.__repr__cCsR|jrt�|j}n|j}t|j�}t|�dkrDt|dt�sD|\}tj||ffS�Nr�r)	r��globalsrYrtr�rxrQ�operatorr�)r�r	r�rTrTrUr�	s
z_GenericAlias.__reduce__csh|jrt��|�S|jtur`t|vr(dS|�|�}||dd�D]}t|t�rB||urBdSqB|jfS)NrTr�)	r�rr�rYrrr
rQr)r�r�rrrrTrUr�s

z_GenericAlias.__mro_entries__)
rgrdrer�r�r�r�r�r�r�r�r�rrTrTrrUrX�s

rXcsTeZdZddd��fdd�
Zedd��Zdd	�Zd
d�Z�fdd
�Zdd�Z	�Z
S)�_SpecialGenericAliasTNrcs^|dur|j}t�j|||d�||_|jdkrBd|j�d�|_nd|j�d|j�d�|_dS)NrrazA generic version of rW)rgrr�rrdrer�)r�r	�nparamsrr�rrTrUr�%s
z_SpecialGenericAlias.__init__csBt|t�s|f}d�t�fdd�|D��}t|||j�|�|�S)Nrc3s|]}t|��VqdSr~r�r�r�rTrUr�4rpz3_SpecialGenericAlias.__getitem__.<locals>.<genexpr>)rQrtr}rr�r'rTr�rUr�/s
z _SpecialGenericAlias.__getitem__cCst|j||j|jd�Sr&)rXrYr�rr'rTrTrUr�8s�z_SpecialGenericAlias.copy_withcCs
d|jSr�r�r�rTrTrUr�<sz_SpecialGenericAlias.__repr__cs:t|t�rt|j|j�St|t�s.t||j�St��|�Sr~)rQr0rrYrXrr�r�rrTrUr�?s


z&_SpecialGenericAlias.__subclasscheck__cCs|jSr~r�r�rTrTrUr�Fsz_SpecialGenericAlias.__reduce__)rgrdrer�r�r�r�r�r�r�rrTrTrrUr0$s

r0cs$eZdZ�fdd�Zdd�Z�ZS)�_CallableGenericAliascsj|jdksJ�t|j�dkr4|jdtur4t���Sdd�dd�|jdd�D���d	t|jd��d
�S)Nr
�rztyping.Callable[[r(cSsg|]}t|��qSrTr)r�rTrTrUroPrpz2_CallableGenericAlias.__repr__.<locals>.<listcomp>���z], r+)r�rxr��Ellipsisrr�r,rir�rrTrUr�Ks
��z_CallableGenericAlias.__repr__cCsD|j}t|�dkr|ddus6t|dd��|df}tjt|ffS)Nr3r.r4)r�rxr�r/r�r
�r�r�rTrTrUr�Ssz _CallableGenericAlias.__reduce__)rgrdrer�r�rrTrTrrUr2Jsr2c@s(eZdZdd�Zdd�Zedd��ZdS)�
_CallableTypecCst|j||j|jd�Sr&)r2rYr�rr'rTrTrUr�[s�z_CallableType.copy_withcCsPt|t�rt|�dkrtd��|\}}t|t�r>t|�|f}n||f}|�|�S)Nr3z6Callable must be used as Callable[[arg, ...], result].)rQrtrxrZr��__getitem_inner__)r�r�r�rrTrTrUr�_s
z_CallableType.__getitem__cCsb|\}}d}t||�}|tur,|�t|f�St|t�s<|f}tdd�|D��}||f}|�|�S)Nz.Callable[args, result]: result must be a type.css|]}t|�VqdSr~)rV)rkrSrTrTrUr�vrpz2_CallableType.__getitem_inner__.<locals>.<genexpr>)r`r5r�rrQrt)r�r�r�rr]rTrTrUr8ms


z_CallableType.__getitem_inner__N)rgrdrer�r�r�r8rTrTrTrUr7Zsr7c@seZdZedd��ZdS)�
_TupleTypecs�|dkr|�tf�St|t�s$|f}t|�dkr\|ddur\d�t|d��}|�|tf�Sd�t�fdd	�|D��}|�|�S)
NrTr3r�.z Tuple[t, ...]: t must be a type.rz*Tuple[t0, t1, ...]: each t must be a type.c3s|]}t|��VqdSr~r�r�r�rTrUr��rpz)_TupleType.__getitem__.<locals>.<genexpr>)r�rrQrtrxr`r)r�r�r�rTr�rUr�|s
z_TupleType.__getitem__Nr�rTrTrTrUr9{sr9cs4eZdZdd�Zdd�Zdd�Z�fdd�Z�ZS)	r�cCst|Sr~)rr'rTrTrUr��sz_UnionGenericAlias.copy_withcCs"t|t�stSt|j�t|j�kSr~)rQr�r�rr�r�rTrTrUr��s
z_UnionGenericAlias.__eq__cCstt|j��Sr~)r��	frozensetr�r�rTrTrUr��sz_UnionGenericAlias.__hash__csd|j}t|�dkrZ|dtd�ur6dt|d��d�S|dtd�urZdt|d��d�St���S)Nr3rztyping.Optional[r�r+)r�rxrPrirr�r6rrTrUr��sz_UnionGenericAlias.__repr__)rgrdrer�r�r�r�rrTrTrrUr��sr�cCsdd�|D�S)Ncss|]}|t|�fVqdSr~)rPr�rTrTrUr��rpz'_value_and_type_iter.<locals>.<genexpr>rT)rzrTrTrUr��sr�c@seZdZdd�Zdd�ZdS)r�cCs*t|t�stStt|j��tt|j��kSr~)rQr�r�rr�r�r�rTrTrUr��s
z_LiteralGenericAlias.__eq__cCsttt|j���Sr~)r�r:r�r�r�rTrTrUr��sz_LiteralGenericAlias.__hash__N)rgrdrer�r�rTrTrTrUr��sr�cs4eZdZdZdZdZedd��Z�fdd�Z�Z	S)raCAbstract 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
    rTFcs�t|t�s|f}|s.|tur.td|j�d���d�t�fdd�|D��}|ttfvr�tdd�|D��sxtd|j�d���t	t
|��t	|�kr�td|j�d	���nt||t	|j��t
||�S)
NzParameter list to z[...] cannot be emptyrc3s|]}t|��VqdSr~r�r�r�rTrUr��rpz,Generic.__class_getitem__.<locals>.<genexpr>css|]}t|t�VqdSr~)rQrr�rTrTrUr��rpzParameters to z [...] must all be type variablesz[...] must all be unique)rQrtrrZrerr�allrgrxrr}rsrX)ryr�rTr�rU�__class_getitem__�s&
���zGeneric.__class_getitem__c
st�j|i|��g}d|jvr,t|jv}nt|jvo>|jdk}|rLtd��d|jv�rt|j�}d}|jD].}t	|t
�rl|jturl|dur�td��|j}ql|du�rt
|�}t
|��|�k�sd��fdd�|D��}d�dd�|D��}	td	|�d
|	�d���|}t|�|_dS)N�__orig_bases__rz!Cannot inherit from plain Genericz0Cannot inherit from Generic[...] multiple types.r(c3s|]}|�vrt|�VqdSr~�rRrj��gvarsetrTrUr��rpz,Generic.__init_subclass__.<locals>.<genexpr>css|]}t|�VqdSr~r>)rk�grTrTrUr��rpzSome type variables (z) are not listed in Generic[r+)rr�r�rr=�	__bases__rgrZrurQrXrYrsrr,rt)
ryr�rrn�error�gvars�base�tvarset�s_vars�s_argsrr?rUr��s<



��


�
zGeneric.__init_subclass__)
rgrdrer�r��_is_protocolr�r<r�rrTrTrrUr�s
rc@seZdZdZdS)rz�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�rgrdrer�rTrTrTrUrsrc@seZdZdZdS)rz(Internal placeholder for ... (ellipsis).NrJrTrTrTrUr	sr)rsr=r
rI�_is_runtime_protocol)�__abstractmethods__�__annotations__r�r�r�rd�__new__r��__subclasshook__r�r<�_MutableMapping__markercCsrt�}|jdd�D]X}|jdvr$qt|di�}t|j���t|���D] }|�d�sJ|tvrJ|�	|�qJq|S)z�Collect protocol members from a protocol class objects.

    This includes names actually defined in the class dictionary, as well
    as names that appear in annotations. Special names (above) are skipped.
    Nr4)rrrM�_abc_)
r�__mro__rgrr�r��keysr�EXCLUDED_ATTRIBUTES�add)ry�attrsrE�annotationsrrTrTrU�_get_protocol_attrss
rXcst�fdd�t��D��S)Nc3s|]}tt�|d��VqdSr~)r\r�rkr�ryrTrUr�+rpz,_is_callable_members_only.<locals>.<genexpr>)r;rXrZrTrZrU�_is_callable_members_only)sr[cOst|�jrtd��dS)Nz Protocols cannot be instantiated)rPrIrZ)r�r�rrTrTrU�_no_init.s
r\c	Cs4zt�d�jddvWSttfy.YdS0dS)z�Allow instance and class checks for special stdlib modules.

    The abc and functools modules indiscriminately call isinstance() and
    issubclass() on the whole MRO of a user class, which may contain protocols.
    �rg)�abcr�TN)r�r�r�r�r�rTrTrTrU�_allow_reckless_class_cheks3sr_)
r
r'rrr)rr%rr+r.�AbstractContextManager�AbstractAsyncContextManager)zcollections.abc�
contextlibcseZdZ�fdd�Z�ZS)�
_ProtocolMetacsVt�dd�rt��r$t�j��r$dS�jrJt��fdd�t��D��rJdSt����S)NrIFTc3s8|]0}t�|�o.tt�|d��p.t�|�duVqdSr~)�hasattrr\rrY�ry�instancerTrUr�Ss�
z2_ProtocolMeta.__instancecheck__.<locals>.<genexpr>)	rr[rrrIr;rXrr�rerrerUr�Ks�
��z_ProtocolMeta.__instancecheck__)rgrdrer�rrTrTrrUrcHsrccs,eZdZdZdZdZdZ�fdd�Z�ZS)raZBase class for protocol classes.

    Protocol classes are defined as::

        class Proto(Protocol):
            def meth(self) -> int:
                ...

    Such classes are primarily used with static type checkers that recognize
    structural subtyping (static duck-typing), for example::

        class C:
            def meth(self) -> int:
                return 0

        def func(x: Proto) -> int:
            return x.meth()

        func(C())  # Passes static type check

    See PEP 544 for details. Protocol classes decorated with
    @typing.runtime_checkable act as simple-minded runtime protocols that check
    only the presence of given attributes, ignoring their type signatures.
    Protocol classes can be generic, they are defined as::

        class GenProto(Protocol[T]):
            def meth(self) -> T:
                ...
    rTTFcs�t�j|i|���j�dd�s6tdd��jD���_�fdd�}d�jvrR|�_�js\dS�jD]F}|tt	fvsb|j
tvr�|jt|j
vsbt
|t	�r�|jsbtd|��qbt�_dS)	NrIFcss|]}|tuVqdSr~)r)rkrrTrTrUr��rpz-Protocol.__init_subclass__.<locals>.<genexpr>cs��j�dd�stSt�dd�s0t�r(tStd��t��sJt�rBtStd��t|t�s\td��t	��D]v}|j
D]b}||jvr�|j|dur�tSqdt|di�}t|tjj
�rn||vrnt|t�rn|jrnqdqntSqddS)	NrIFrKzLInstance and class checks can only be used with @runtime_checkable protocolsz<Protocols with non-method members don't support issubclass()z"issubclass() arg 1 must be a classrMT)r�r�r�rr_rZr[rQrPrXrR�collectionsr^rrrrI)r�rrErWrZrTrU�_proto_hook�s:


���
z/Protocol.__init_subclass__.<locals>._proto_hookrOz7Protocols can only inherit from other protocols, got %r)rr�r�r��anyrBrIrO�objectrrd�_PROTO_WHITELISTrgrrZr\r�)ryr�rrhrErrZrUr�~s,&

�����zProtocol.__init_subclass__)	rgrdrer�r�rIrKr�rrTrTrrUr\s
r)�	metaclasscsHeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	�Z
S)�_AnnotatedAliasa7Runtime representation of an annotated type.

    At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
    with extra annotations. The alias behaves like a normal typing alias,
    instantiating is the same as instantiating the underlying type, binding
    it to types is also the same.
    cs2t|t�r|j|}|j}t��||�||_dSr~)rQrm�__metadata__rYrr�)r�r	�metadatarrTrUr��s


z_AnnotatedAlias.__init__cCs$t|�dksJ�|d}t||j�Sr-)rxrmrn)r�r��new_typerTrTrUr��sz_AnnotatedAlias.copy_withcCs$d�t|j�d�dd�|jD���S)Nztyping.Annotated[{}, {}]r(css|]}t|�VqdSr~)rcr�rTrTrUr��rpz+_AnnotatedAlias.__repr__.<locals>.<genexpr>)�formatrirYr,rnr�rTrTrUr��s�z_AnnotatedAlias.__repr__cCstjt|jf|jffSr~)r/r�rrYrnr�rTrTrUr��s�z_AnnotatedAlias.__reduce__cCs&t|t�stS|j|jko$|j|jkSr~)rQrmr�rYrnr�rTrTrUr��s


�z_AnnotatedAlias.__eq__cCst|j|jf�Sr~)r�rYrnr�rTrTrUr��sz_AnnotatedAlias.__hash__)rgrdrer�r�r�r�r�r�r�rrTrTrrUrm�srmc@s0eZdZdZdZdd�Zedd��Zdd�Zd	S)
ra�Add context specific metadata to a type.

    Example: Annotated[int, runtime_check.Unsigned] indicates to the
    hypothetical runtime_check module that this type is an unsigned int.
    Every other consumer of this type can ignore this metadata and treat
    this type as int.

    The first argument to Annotated must be a valid type.

    Details:

    - It's an error to call `Annotated` with less than two arguments.
    - Nested Annotated are flattened::

        Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

    - Instantiating an annotated type is equivalent to instantiating the
    underlying type::

        Annotated[C, Ann1](5) == C(5)

    - Annotated can be used as a generic type alias::

        Optimized = Annotated[T, runtime.Optimize()]
        Optimized[int] == Annotated[int, runtime.Optimize()]

        OptimizedList = Annotated[List[T], runtime.Optimize()]
        OptimizedList[int] == Annotated[List[int], runtime.Optimize()]
    rTcOstd��dS)Nz&Type Annotated cannot be instantiated.r��ryr�rrTrTrUrNszAnnotated.__new__cCsJt|t�rt|�dkrtd��d}t|d|�}t|dd��}t||�S)Nr3zUAnnotated[...] should be used with at least two arguments (a type and an annotation).z$Annotated[t, ...]: t must be a type.rr�)rQrtrxrZr`rm)ryr�r]r	rorTrTrUr<szAnnotated.__class_getitem__cOstd�|j���dS)NzCannot subclass {}.Annotated)rZrqrdrrrTrTrUr�s
�zAnnotated.__init_subclass__N)	rgrdrer�r�rNr�r<r�rTrTrTrUr�s

rcCs&t|t�r|jstd|��d|_|S)a9Mark a protocol class as a runtime protocol.

    Such protocol can be used with isinstance() and issubclass().
    Raise TypeError if applied to a non-protocol class.
    This allows a simple-minded structural check very similar to
    one trick ponies in collections.abc such as Iterable.
    For example::

        @runtime_checkable
        class Closable(Protocol):
            def close(self): ...

        assert isinstance(open('/some/file'), Closable)

    Warning: this will check only the presence of the required methods,
    not their type signatures!
    zB@runtime_checkable can be only applied to protocol classes, got %rT)rrrIrZrKrZrTrTrUrMs�rMcCs|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).
    rT)�typrrTrTrUrC5srCc
Cs�z
|j}Wnty iYS0|j}|j}|d|�}|jpBd}|j}|rVt|�ni}|t|�}t||d�|�D]\}}	||vs�J�|	||<qx|S)z:Internal helper to extract the default arguments, by name.NrT)	�__code__r��co_argcount�co_varnames�__defaults__�__kwdefaults__r!rxr")
r�r��	pos_count�	arg_names�defaults�
kwdefaultsr�
pos_offsetr��valuerTrTrU�
_get_defaults@s



rcCs�t|dd�riSt|t�r�i}t|j�D]z}|durDtj|jj}n|}|j�	di�}|�
�D]B\}}	|	durvtd�}	t|	t�r�t|	dd�}	t
|	||�}	|	||<q^q(|r�|Sdd�|�
�D�S|du�rt|tj�r�|j}n"|}
t|
d�r�|
j}
q�t|
d	i�}|du�r|}n|du�r|}t|dd�}|du�rPt|t��rBiStd
�|���t|�}t|�}|�
�D]d\}}	|	du�r�td�}	t|	t��r�t|	�}	t
|	||�}	||v�r�||du�r�t|	}	|	||<�qh|�r�|Sdd�|�
�D�S)aReturn type hints for an object.

    This is often the same as obj.__annotations__, but it handles
    forward references encoded as string literals, adds Optional[t] if a
    default value equal to None is set and recursively replaces all
    'Annotated[T, ...]' with 'T' (unless 'include_extras=True').

    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__NrMFr�cSsi|]\}}|t|��qSrT��_strip_annotations�rk�krlrTrTrU�
<dictcomp>�rpz"get_type_hints.<locals>.<dictcomp>�__wrapped__�__globals__z1{!r} is not a module, class, method, or function.cSsi|]\}}|t|��qSrTr�r�rTrTrUr��rp)rrQrP�reversedrRr��modulesrdr�r��itemsrRr
r�rb�
ModuleTyperdr��_allowed_typesrZrqrr!r)rhr�r��include_extras�hintsrE�base_globals�annr�r~�nsobjr{rTrTrUrGYs^ 






�
rGcCs�t|t�rt|j�St|t�rJtdd�|jD��}||jkr@|S|�|�St|t�r�tdd�|jD��}||jkrv|St|j|�S|S)z.Strips the annotations from a given type.
    css|]}t|�VqdSr~r�r�rTrTrUr��rpz%_strip_annotations.<locals>.<genexpr>css|]}t|�VqdSr~r�r�rTrTrUr��rp)	rQrmr�rYrXrtr�r�r)rl�
stripped_argsrTrTrUr��s






r�cCs2t|t�rtSt|ttf�r"|jS|tur.tSdS)a�Get the unsubscripted version of a type.

    This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
    and Annotated. Return None for unsupported types. Examples::

        get_origin(Literal[42]) is Literal
        get_origin(int) is None
        get_origin(ClassVar[int]) is ClassVar
        get_origin(Generic) is Generic
        get_origin(Generic[T]) is Generic
        get_origin(Union[T, int]) is Union
        get_origin(List[Tuple[T, T]][int]) == list
    N)rQrmrrrrYr)�tprTrTrUrF�s
rFcCsft|t�r|jf|jSt|ttf�rb|j}|jtjj	ur^|dt
ur^t|dd��|df}|SdS)a�Get type arguments with all substitutions performed.

    For unions, basic simplifications used by Union constructor are performed.
    Examples::
        get_args(Dict[str, int]) == (str, int)
        get_args(int) == ()
        get_args(Union[int, Union[T, int], str][int]) == (int, str)
        get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
        get_args(Callable[[], T][int]) == ([], int)
    rNr4rT)rQrmrYrnrXrr�rgr^r
r5r�)r�rrTrTrUrE�s
rEcCs�t|t�rt|j��}|j��D]"\}}||j|fvr|�|�q|��D](}t|tj	�r`d|_
t|t�rJt|�qJz
d|_
Wnty�Yn0|S)aIDecorator 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)
rQrPr��copyr�rB�pop�valuesrbrfr�rIrZ)rS�	arg_attrsrrrhrTrTrUrI�s	




rIcst����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�|i|��}t|�}|Sr~)rI)r�r�r��r�rTrU�wrapped_decoratorsz2no_type_check_decorator.<locals>.wrapped_decorator)r�r�)r�r�rTr�rUrJsrJcOstd��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)�NotImplementedErrorr�rTrTrU�_overload_dummys�r�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�rTrTrUrL!srLcCs|S)aVA decorator to indicate final methods and final classes.

    Use this decorator to indicate to type checkers that the decorated
    method cannot be overridden, and decorated class cannot be subclassed.
    For example:

      class Base:
          @final
          def done(self) -> None:
              ...
      class Sub(Base):
          def done(self) -> None:  # Error reported by type checker
                ...

      @final
      class Leaf:
          ...
      class Other(Leaf):  # Error reported by type checker
          ...

    There is no runtime checking of these properties.
    rT)�frTrTrUrD>srD�T�KT�VT�T_co)r��V_co�VT_co�T_contra)r��CT_co)r�r�rBr�r]r3a�Callable type; Callable[[int], str] is a function of (int) -> str.

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

    There is no syntax to indicate optional or keyword arguments,
    such function types are rarely used as callback types.
    r)r�r4rra@Tuple type; Tuple[X, Y] is the cross-product type of X and Y.

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

    To specify a variable-length tuple of homogeneous type, use Tuple[T, ...].
    r;r8r=r>rr-r9r:ra�A special construct usable to annotate class objects.

    For example, suppose we have the following classes::

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

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

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

      joe = new_user(BasicUser)

    At this point the type checker knows that joe has type BasicUser.
    c@s&eZdZdZdZeed�dd��ZdS)r4z(An ABC with one abstract method __int__.rT��returncCsdSr~rTr�rTrTrU�__int__�szSupportsInt.__int__N)rgrdrer�r�r�intr�rTrTrTrUr4�sr4c@s&eZdZdZdZeed�dd��ZdS)r2z*An ABC with one abstract method __float__.rTr�cCsdSr~rTr�rTrTrU�	__float__�szSupportsFloat.__float__N)rgrdrer�r�r�floatr�rTrTrTrUr2�sr2c@s&eZdZdZdZeed�dd��ZdS)r1z,An ABC with one abstract method __complex__.rTr�cCsdSr~rTr�rTrTrU�__complex__�szSupportsComplex.__complex__N)rgrdrer�r�r�complexr�rTrTrTrUr1�sr1c@s&eZdZdZdZeed�dd��ZdS)r0z*An ABC with one abstract method __bytes__.rTr�cCsdSr~rTr�rTrTrU�	__bytes__�szSupportsBytes.__bytes__N)rgrdrer�r�r�bytesr�rTrTrTrUr0�sr0c@s&eZdZdZdZeed�dd��ZdS)r3z*An ABC with one abstract method __index__.rTr�cCsdSr~rTr�rTrTrU�	__index__�szSupportsIndex.__index__N)rgrdrer�r�rr�r�rTrTrTrUr3�sr3c@s&eZdZdZdZeed�dd��ZdS)r/zMAn ABC with one abstract method __abs__ that is covariant in its return type.rTr�cCsdSr~rTr�rTrTrU�__abs__�szSupportsAbs.__abs__N)rgrdrer�r�rr�r�rTrTrTrUr/�sr/c@s*eZdZdZdZedeed�dd��ZdS)	r5zOAn ABC with one abstract method __round__ that is covariant in its return type.rTr)�ndigitsr�cCsdSr~rT)r�r�rTrTrU�	__round__szSupportsRound.__round__N)r)	rgrdrer�r�rr�r�r�rTrTrTrUr5�sr5rTcCs@dd�|D�}dd�|D�}tj||||d�}||_|j_|S)NcSsg|]\}}|�qSrTrT�rk�nrlrTrTrUrorpz!_make_nmtuple.<locals>.<listcomp>cSs$i|]\}}|t|d|�d���qS)zfield z annotation must be a typer�r�rTrTrUr�s�z!_make_nmtuple.<locals>.<dictcomp>�r{�module)rg�
namedtuplerMrN)r�rbr�r{�fields�nm_tplrTrTrU�
_make_nmtuples��r�>
�_asdictr��_replace�__getnewargs__rN�_make�_source�_field_defaultsr��_fields>rdrMrgc@seZdZdd�ZdS)�NamedTupleMetac	
s�|dtusJ���di�}g}|D]L}|�vr<|�|�q$|r$td|�dt|�dkrZdnd�dd	�|�����q$t||���fd
d�|D��dd
�}�D]<}|tvr�t	d|��q�|t
vr�||jvr�t||�|�q�|S)NrrMzNon-default namedtuple field z cannot follow default fieldr��s�� r(csg|]}�|�qSrTrT)rkr���nsrTrUro'rpz*NamedTupleMeta.__new__.<locals>.<listcomp>rdr�z&Cannot overwrite NamedTuple attribute )
�_NamedTupler�rqrZrxr,r�r��_prohibitedr��_specialr�r)	ry�typenamer�r�rb�
default_names�
field_namer��keyrTr�rUrNs,
��

�zNamedTupleMeta.__new__N)rgrdrerNrTrTrTrUr�sr�c	Ks`|dur|��}n|rtd��zt�d�j�dd�}WnttfyPd}Yn0t|||d�S)a�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 an extra __annotations__ attribute, giving a
    dict that maps field names to types.  (The field names are also 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)])
    NzIEither list of fields or keywords can be provided to NamedTuple, not bothr�rgr�)r�)	r�rZr�r�r�r�r�r�r�)r�r�rr�rTrTrUr?2s

r?cCs*t|�dkrtd��|dtus$J�tfS)Nr�z5Multiple inheritance with NamedTuple is not supportedr)rxrZr?r��r�rTrTrU�_namedtuple_mro_entriesWsr�c@s&eZdZddd�ZeZdd�ZeZdS)�_TypedDictMetaTcs|D]}t|�turtd��qt�t|tf|�}i}|�di�}t|���}	d��fdd�|��D�}t�}
t�}|D]@}|�	|j
�di��|
�	|j
�dd��|�	|j
�dd��qv|�	|�|r�|
�	|	�n
|�	|	�||_t|
�|_
t|�|_t|d	��s||_|S)
a5Create new typed dict class object.

        This method is called when TypedDict is subclassed,
        or when TypedDict is instantiated. This way
        TypedDict supports all three syntax forms described in its docstring.
        Subclasses and instances of TypedDict return actual dictionaries.
        zHcannot inherit from both a TypedDict type and a non-TypedDict base classrMz?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typecsi|]\}}|t|���qSrTr�)rkr�r�r�rTrUr�ssz*_TypedDictMeta.__new__.<locals>.<dictcomp>�__required_keys__rT�__optional_keys__�	__total__)rPr�rZrNr!r�rrSr��updater�rMr:r�r�rdr�)ryr�r�r��totalrE�tp_dictrW�own_annotations�own_annotation_keys�
required_keys�
optional_keysrTr�rUrNas6

�



z_TypedDictMeta.__new__cCstd��dS)Nz4TypedDict does not support instance and class checksr�)ryr�rTrTrUr��sz _TypedDictMeta.__subclasscheck__N)T)rgrdrerNr!r�r�r�rTrTrTrUr�`s
*r��r�c	Ksj|dur|}n|rtd��dt|�i}zt�d�j�dd�|d<WnttfyXYn0t|d||d	�S)
aSA simple typed namespace. At runtime it is equivalent to a plain dict.

    TypedDict creates a dictionary type that expects all of its
    instances to have a certain set of keys, where each key is
    associated with a value of a consistent type. This expectation
    is not checked at runtime but is only enforced by type checkers.
    Usage::

        class Point2D(TypedDict):
            x: int
            y: int
            label: str

        a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
        b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

        assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

    The type info can be accessed via the Point2D.__annotations__ dict, and
    the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
    TypedDict supports two additional equivalent forms::

        Point2D = TypedDict('Point2D', x=int, y=int, label=str)
        Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

    By default, all keys must be present in a TypedDict. It is possible
    to override this by specifying totality.
    Usage::

        class point2D(TypedDict, total=False):
            x: int
            y: int

    This means that a point2D TypedDict can have any of the keys omitted.A type
    checker is only expected to support a literal False or True as the value of
    the total argument. True is the default, and makes all items defined in the
    class body be required.

    The class syntax is only supported in Python 3.6+, while two other
    syntax forms work for Python 2.7 and 3.2+
    Nz@TypedDict takes either a dict or keyword arguments, but not bothrMr�rgr�rdrTr�)	rZr!r�r�r�r�r�r�r�)r�r�r�rr�rTrTrUr@�s*r@cCstfSr~)�
_TypedDictr�rTrTrU�<lambda>�rpr�cCsdd�}||_||_|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|Sr~rT)rrTrTrUrp�szNewType.<locals>.new_type)rg�
__supertype__)r�r�rprTrTrUrH�srHc@s�eZdZdZdZeeed�dd���Zeeed�dd���Z	edd�d	d
��Z
eeed�dd���Zee
d�d
d��Zedd�dd��Zeed�dd��Zed7e
ed�dd��Zeed�dd��Zed8e
ed�dd��Zed9e
eed�dd��Zed:e
e
e
d �d!d"��Zeed�d#d$��Zee
d�d%d&��Zed;e
e
d'�d(d)��Zeed�d*d+��Zeee
d,�d-d.��Zeeedd/�d0d1��Zed2d�d3d4��Zedd�d5d6��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.
    rTr�cCsdSr~rTr�rTrTrU�modeszIO.modecCsdSr~rTr�rTrTrUr�szIO.nameNcCsdSr~rTr�rTrTrU�close
szIO.closecCsdSr~rTr�rTrTrU�closedsz	IO.closedcCsdSr~rTr�rTrTrU�filenosz	IO.filenocCsdSr~rTr�rTrTrU�flushszIO.flushcCsdSr~rTr�rTrTrU�isattysz	IO.isattyr4)r�r�cCsdSr~rT)r�r�rTrTrU�read"szIO.readcCsdSr~rTr�rTrTrU�readable&szIO.readable)�limitr�cCsdSr~rT)r�r�rTrTrU�readline*szIO.readline)�hintr�cCsdSr~rT)r�r�rTrTrU�	readlines.szIO.readlinesr)�offset�whencer�cCsdSr~rT)r�r�r�rTrTrU�seek2szIO.seekcCsdSr~rTr�rTrTrU�seekable6szIO.seekablecCsdSr~rTr�rTrTrU�tell:szIO.tell)�sizer�cCsdSr~rT)r�r�rTrTrU�truncate>szIO.truncatecCsdSr~rTr�rTrTrU�writableBszIO.writable�r�r�cCsdSr~rT�r�r�rTrTrU�writeFszIO.write)�linesr�cCsdSr~rT)r�r�rTrTrU�
writelinesJsz
IO.writelinesz
IO[AnyStr]cCsdSr~rTr�rTrTrU�	__enter__NszIO.__enter__cCsdSr~rT)r�rPr~�	tracebackrTrTrU�__exit__RszIO.__exit__)r4)r4)r4)r)N) rgrdrer�r��propertyrrRr�r�r�r�r�r�r�r�r�rBr�r�r�r;r�r�r�r�r�r�r�r�r�r�rTrTrTrUr��sZr�c@sBeZdZdZdZeeeefe	d�dd��Z
edd�dd��Zd	S)
�BinaryIOz5Typed version of the return of open() in binary mode.rTr�cCsdSr~rTr�rTrTrUr�\szBinaryIO.writer�cCsdSr~rTr�rTrTrUr�`szBinaryIO.__enter__N)rgrdrer�r�rrr��	bytearrayr�r�r�rTrTrTrUr�Wsr�c@s�eZdZdZdZeeed�dd���Zeee	d�dd���Z
eeee	d�dd	���Zeee
d�d
d���Zeeed�dd
���Zedd�dd��ZdS)�TextIOz3Typed version of the return of open() in text mode.rTr�cCsdSr~rTr�rTrTrU�bufferjsz
TextIO.buffercCsdSr~rTr�rTrTrU�encodingoszTextIO.encodingcCsdSr~rTr�rTrTrU�errorstsz
TextIO.errorscCsdSr~rTr�rTrTrU�line_bufferingyszTextIO.line_bufferingcCsdSr~rTr�rTrTrU�newlines~szTextIO.newlinescCsdSr~rTr�rTrTrUr��szTextIO.__enter__N)rgrdrer�r�r�rr�rrRrrrr�rr	rr�rTrTrTrUres&rc@s$eZdZdZgd�ZeZeZeZdS)�ioz)Wrapper namespace for IO generic classes.)r�rr�N)rgrdrer��__all__r�rr�rTrTrTrUr�s
rz.ioc@s eZdZdZddgZeZeZdS)�rez&Wrapper namespace for re type aliases.�Pattern�MatchN)rgrdrer�rr	r
rTrTrTrUr�srz.re)T)N)NNF)rT)N)N)�r�r^rrrg�collections.abcrbr�r/r�	stdlib_rer�rbrrrrrrVr`rirur}r�r�r�r�r�r:r�r�r�r[r�r	rKrrrrrr
rrrrXr0r2r7r9r�r�r�rrr�_TYPING_INTERNALS�_SPECIAL_NAMESrTrXr[r\r_rkrcrrmrrMrCrrf�BuiltinFunctionType�
MethodTyper�r�rGr�rFrErIrJr�rLrDr�r�r�r�r�r�r�rPr�r�rRrB�_aliasrr'r*r)r(rrr.r%rr+r
r=rr#rr!r$r"rrtrr�r;�dequer8rr>r rrr&r`rrar-r!r9�defaultdictr:r<r7r6rAr,rr4r2r1r0r3r/r5r�r�r�r�r?rNr�r�r�r�r@r�rHrNrOr�r�rrrgr�r	r
rTrTrTrU�<module>sfY	
	






%

$8TFS&!Q
�	b)5�
W	�
�	�							

#49
c#