python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
typing.cpython-312.opt-1.pyc

ˑedZddlmZmZddlZddlmZddlZddlZddlZddl	Z	ddl
Z
ddlZddl
Z
ddlZddlZddlmZmZmZmZddlmZmZmZmZmZmZmZmZgdZddd	d
Zddd	dZd
Z dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(gZ)iZ*ddddZ+e,fdZ-GddZ.GddZ/Gdde.e/dZ0Gd d!e0dZ1Gd"d#e2Z3Gd$d%e3&Z4e0d'Z5e0d(Z6e0d)Z7e0d*Z8e0d+Z9e0d,Z:e0d-Z;d.Z<e0d/Z=e1e+dd0Z>e0d1Z?e0d2Z@e0d3ZAGd4d5e.dZBd6e4d7eCfd8ZDd6e4d7eCfd9ZEGd:d;ZFd<ZGd=ZHd>ZId?ZJe+d@ZKdAZLdBZMGdCdDe.dZNGdEdFeNdZOGdGdHe/eNdZPGdIdJePdZQGdKdLe/eOdZRGdMdNePdZSGdOdPePdZTGdQdRe/eOdZUdSZVGdTdUeOdZWGdVdWeOdZXe0dXZYGdYdZeOdZZGd[d\Z[e,hd]Z\e,hd^Z]e\e]zd_hzZ^d`Z_daZ`ddcZaddeZbgdfdgdhgdiZce	jdjZee)jeejdkZhejeehdlZjejeej[h[jGdmdneZkeldoZmGdpdqeek&ZnGdrdse/eOdZoGdtduZpdvZqdwZrdxZsejejejejeeefZxddyZydzZzd{Z{d|Z|d}Z}d~Z~de6d7e6fdZdZdZdZee	jeeZdZdZdZdZedZedZedZeddZeddZeddZeddZedde2ZedeeZePZeejj,dZeejj.dbZeejj0dZeejj2dbZeejj4dbZeejj6dbZeejj8dbZeejj:dbZeejj<dZeejj>dbZeejj@dbZeSejjBddZde_eejjDdbdZeejjHdbZeejjJddZeejjLddZeejjNdbZeejjPdbZeQejjRddZeTedddZde_eedbddZeej\dbdZeedbddZee,dbddZeejjddbZeejjfdbZeejjhddZeejjjdbZeejldbdZeejpdbdZeeddddZeej
dddZeejxddZeejzdbZeej|ddZeejj~dZeejjddZee2dbddZde_eqGddenZeqGddenZeqGddenZeqGddenZeqGddenZeqdZeqdZddZe,hdZe,hdZGdde2ZddZe2jeddiZdZee_Gdde2ZddddZe2jeddiZd„e_e0dÄZe0dĄZGdńdƫZeZdZGdDŽdeeZGdɄdeeZGd˄deeZGd̈́de2ZGdτdeݬ&Zedze_ee
jeސj<eejdbZeejdbZGd҄deݬ&Zedze_ee
jej<dՄZGdքdenZdddddd؜deCdeCdeCdeCdee2e4ede4fzdfde4d7efdZdddfZdZy)a
The typing module: Support for gradual typing as defined by PEP 484 and subsequent PEPs.

Among other things, the module includes the following:
* Generic, Protocol, and internal machinery to support generic aliases.
  All subscripted types like X[int], Union[int, str] are generic aliases.
* Various "special forms" that have unique meanings in type annotations:
  NoReturn, Never, ClassVar, Self, Concatenate, Unpack, and others.
* Classes whose instances can be type arguments to generic classes and functions:
  TypeVar, ParamSpec, TypeVarTuple.
* Public helper functions: get_type_hints, overload, cast, final, and others.
* Several protocols to support duck-typing:
  SupportsFloat, SupportsIndex, SupportsAbs, and others.
* Special types: NewType, NamedTuple, TypedDict.
* Deprecated wrapper submodules for re and io related types.
* Deprecated aliases for builtin types and collections.abc ABCs.

Any name not present in __all__ is an implementation detail
that may be changed without notice. Use at your own risk!
)abstractmethodABCMetaN)defaultdict)WrapperDescriptorTypeMethodWrapperTypeMethodDescriptorTypeGenericAlias)_idfuncTypeVar	ParamSpecTypeVarTuple
ParamSpecArgsParamSpecKwargs
TypeAliasTypeGeneric)c	AnnotatedAnyCallableClassVarConcatenateFinal
ForwardRefrLiteralOptionalrProtocolTupleTyperr
UnionAbstractSet
ByteString	ContainerContextManagerHashable	ItemsViewIterableIteratorKeysViewMappingMappingViewMutableMappingMutableSequence
MutableSetSequenceSized
ValuesView	Awaitable
AsyncIterator
AsyncIterable	Coroutine
CollectionAsyncGeneratorAsyncContextManager
ReversibleSupportsAbs
SupportsBytesSupportsComplex
SupportsFloat
SupportsIndexSupportsInt
SupportsRoundChainMapCounterDequeDictDefaultDictListOrderedDictSet	FrozenSet
NamedTuple	TypedDict	GeneratorBinaryIOIOMatchPatternTextIOAnyStrassert_typeassert_nevercastclear_overloadsdataclass_transformfinalget_args
get_origin
get_overloadsget_type_hintsis_typeddict
LiteralStringNeverNewType
no_type_checkno_type_check_decoratorNoReturnNotRequiredoverloadoverriderrRequiredreveal_typeruntime_checkableSelfText
TYPE_CHECKING	TypeAlias	TypeGuardrUnpackFallow_special_formsc\|tdSt|trt|||S|S)z=For converting None to type(None), and strings to ForwardRef.N)moduleis_class)type
isinstancestrr)argrqros   :/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/typing.py
_type_convertrxs0
{Dz#s#f7JKKJTcttf}|s|tfz
}|r
|tfz
}t	|||}t|tr|j|vrt|d|ttttttfvr|S|r|ttfvr|St|ts|ttfvrtd|dt!|t"urt|d|dd|S)aCheck 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).
    )rqro is not valid as type argumentzPlain z Got z.100.)rrrrrxrt
_GenericAlias
__origin__	TypeErrorrr\rar]rhrk_SpecialFormrstuple)rvmsgis_argumentrqroinvalid_generic_formss      rw_type_checkrs%h/(,!eX-!
F@S
TC3
&NN333%=>??
sM8UD)DD
sx&77
#|$/B(B&%CDEECyE3%uS4L233JrycN|duxs t|ttttfSN.)rtrlistr_ConcatenateGenericAlias)rvs rw_is_param_exprrs,#:@C
D)%=>@@ryc|jtjjuxrt	|dk(xrt|dS)aInternal helper for munging collections.abc.Callable's __args__.

    The canonical representation for a Callable's __args__ flattens the
    argument types, see https://github.com/python/cpython/issues/86361.

    For example::

        assert collections.abc.Callable[[int, int], str].__args__ == (int, int, str)
        assert collections.abc.Callable[ParamSpec, str].__args__ == (ParamSpec, str)

    As a result, if we need to reconstruct the Callable from its __args__,
    we need to unflatten it.
    r)r~collectionsabcrlenr)typargss  rw_should_unflatten_callable_argsrs@	+//222	=Ta;N47$;<rycVt|tr6|jdk(r|jS|jd|jS|duryt|tj
r|jSt|trddjd|DzdzSt|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).
    builtinsr|....[, c32K|]}t|ywN)
_type_repr).0ts  rw	<genexpr>z_type_repr.<locals>.<genexpr>s:z!}:])
rtrs
__module____qualname__typesFunctionType__name__rjoinreprobjs rwrrs#t>>Z'###..!3#3#3"455
cz#u))*||#uTYY:c:::S@@9ryc`g}|D]}t|trt|tr/|D])}t|gD]}||vs|j	|+St|dr||vsd|j	|vt
|ddD]}||vs|j	|t|S)zCollect all type variables and parameter specifications in args
    in order of first appearance (lexicographic order).

    For example::

        assert _collect_parameters((T, Callable[P, T])) == (T, P)
    __typing_subst____parameters__)rtrsr_collect_parametersappendhasattrgetattr)r
parametersrx	collecteds     rwrrsJ
)a
5
!
5!4aS!95I 
2")))45
5Q*
+
"!!!$Q 0"5
)J&%%a(
))$ryc
|st|dt|}||k7rtd||kDrdndd|d|d|y)	zCheck correct count for parameters of a generic cls (internal helper).

    This gives a nice error message in case of count mismatch.
     is not a generic classToo manyfew arguments for 	; actual , expected N)rr)clsrelenalens    rw_check_genericr sh
3%6788z?Dt|$v%@PSuU##'&D6;<	<rycg}|D]=}t|dd}||r|ddus|j|-|j|?|S)N__typing_unpacked_tuple_args__.)rextendr)rnewargsrvsubargss    rw_unpack_argsr,sWG #?FGBK34FNN7#NN3 Nryct|}t|t|kr2g}|D])}||vs|j||j|+|}|Sr)setrrremove)params
all_params
new_paramsrs    rw_deduplicater6s^VJ
:V$
	%AJ!!!$!!!$	%Mrycg}|D]O}t|ttjfr|j	|j
?|j
|Qtt|S)zwInternal helper for Union creation and substitution.

    Flatten Unions among parameters, then remove duplicates.
    )	rt_UnionGenericAliasr	UnionTyper__args__rrrrrps   rw_remove_dups_flattenrDsZF
a,eoo>?MM!**%MM!	f%&&rycg}|D]?}t|tr|j|j/|j	|At|S)zHInternal helper for Literal creation: flatten Literals among parameters.)rt_LiteralGenericAliasrrrrrs   rw_flatten_literal_paramsrTsI
F
a-.MM!**%MM!	
=rytypedc&fd}|||S|S)zInternal wrapper caching __getitem__ of generic types.

    For non-hashable arguments, the original function is used as a fallback.
    ctj}|t<tj	|j
~tjfd}|S)NrcP	t|i|S#t$rYnwxYw|i|Sr)_cachesr)rkwdsfuncs  rwinnerz+_tp_cache.<locals>.decorator.<locals>.innerss>
t}d3d33

&&&s
	)	functools	lru_cacher	_cleanupsrcache_clearwraps)rcacherrs`  rw	decoratorz_tp_cache.<locals>.decoratorhs^1	##%06
**+			'
	'ryr)rrrs ` rw	_tp_cachercs 
(ryct|tr|jSt|ttt
jfrt|trftd|jD}|j}t||r|j|dd|df}n|j|}|r	t|}tfd|jD}||jk(r|St|trt	|j|St|t
jr$tjtj |S|j#|S|S)zEvaluate 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 infinite recursion with a recursive
    ForwardRef.
    c3VK|]!}t|trt|n|#ywr)rtrurrrvs  rwrz_eval_type.<locals>.<genexpr>s*$.c3#7
3S@s')Nrc3:K|]}t|ywr)
_eval_type)raglobalnslocalnsrecursive_guards  rwrz_eval_type.<locals>.<genexpr>s^a
1hI^s)rtr	_evaluater}r	rrrr__unpacked__rr~rmrreduceoperatoror_	copy_with)rrrrris_unpackedev_argss ```   rwrrs$!Z {{8Wo>>!m\5??CDa&::D..K.q$7LL$s)T"X!67LL&1I^STS]S]^^ajj Ha&g66a)##HLL'::;;w''HryceZdZdZdZdZy)_FinalzMixin to prohibit subclassing.)__weakref__c"d|vrtdy)N_rootz&Cannot subclass special typing classesr)rrrs   rw__init_subclass__z_Final.__init_subclass__s$DEEryN)rrr__doc__	__slots__rrryrwrrs( IFryrceZdZdZdZdZy)_NotIterableaMixin to prevent iteration, without being compatible with Iterable.

    That is, we could do::

        def __iter__(self): raise TypeError()

    But this would make users of this mixin duck type-compatible with
    collections.abc.Iterable - isinstance(foo, Iterable) would be True.

    Luckily, we can instead prevent iteration by setting __iter__ to None, which
    is treated specially.
    rN)rrrrr__iter__rryrwrrsIHryrc\eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
edZy
)r)_namer_getitemcV||_|j|_|j|_yr)rrrr)selfgetitems  rw__init__z_SpecialForm.__init__s!
%%
ryc8|dvr|jSt|)N>rr)rAttributeError)r
items  rw__getattr__z_SpecialForm.__getattr__s //::T""ryctd|)NCannot subclass rr
basess  rw__mro_entries__z_SpecialForm.__mro_entries__s*4(344ryc d|jzSNtyping.rr
s rw__repr__z_SpecialForm.__repr__4::%%ryc|jSrrrs rw
__reduce__z_SpecialForm.__reduce__zzryctd|)NzCannot instantiate r)r
rrs   rw__call__z_SpecialForm.__call__s-dX677ryct||fSrrr
others  rw__or__z_SpecialForm.__or__T5[!!ryct||fSrr#r$s  rw__ror__z_SpecialForm.__ror__UD[!!ryct|d)Nz! cannot be used with isinstance()rr
rs  rw__instancecheck__z_SpecialForm.__instancecheck__4& ABCCryct|d)Nz! cannot be used with issubclass()rr
rs  rw__subclasscheck__z_SpecialForm.__subclasscheck__r.ryc&|j||Sr)rr
rs  rw__getitem__z_SpecialForm.__getitem__s}}T:..ryN)rrrrrrrrrr!r&r)r-r1rr4rryrwrrsO0I'
#5&8""DD//ryr)rceZdZdZy)_LiteralSpecialFormcNt|ts|f}|j|g|Sr)rtrrr3s  rwr4z_LiteralSpecialForm.__getitem__s)*e,$Jt}}T/J//ryN)rrrr4rryrwr6r6s0ryr6c(eZdZfdZfdZxZS)_AnyMetacH|turtdt|
|S)Nz+typing.Any cannot be used with isinstance())rrsuperr-)r
r	__class__s  rwr-z_AnyMeta.__instancecheck__s&3;IJJw(--ryc2|turyt|	S)Nz
typing.Any)rr;r)r
r<s rwrz_AnyMeta.__repr__s3;w!!ry)rrrr-r
__classcell__r<s@rwr9r9s.
""ryr9c"eZdZdZfdZxZS)raWSpecial 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
    checks.
    cP|turtdt||g|i|S)NzAny cannot be instantiated)rrr;__new__rrkwargsr<s   rwrBzAny.__new__s/#:899ws4T4V44ry)rrrrrBr>r?s@rwrrs	55ryr)	metaclassct|d)aSpecial type indicating functions that never return.

    Example::

        from typing import NoReturn

        def stop() -> NoReturn:
            raise Exception('no way')

    NoReturn can also be used as a bottom type, a type that
    has no values. Starting in Python 3.11, the Never type should
    be used for this concept instead. Type checkers should treat the two
    equivalently.
     is not subscriptablerr3s  rwraras tf12
33ryct|d)adThe bottom type, a type that has no members.

    This can be used to define a function that should never be
    called, or a function that never returns::

        from typing import Never

        def never_call_me(arg: Never) -> None:
            pass

        def int_or_str(arg: int | str) -> None:
            never_call_me(arg)  # type checker error
            match arg:
                case int():
                    print("It's an int")
                case str():
                    print("It's a str")
                case _:
                    never_call_me(arg)  # OK, arg is of type Never
    rGrr3s  rwr]r]&s,tf12
33ryct|d)asUsed to spell the type of "self" in classes.

    Example::

        from typing import Self

        class Foo:
            def return_self(self) -> Self:
                ...
                return self

    This is especially useful for:
        - classmethods that are used as alternative constructors
        - annotating an `__enter__` method which returns self
    rGrr3s  rwrhrh?s"tf12
33ryct|d)a
Represents an arbitrary literal string.

    Example::

        from typing import LiteralString

        def run_query(sql: LiteralString) -> None:
            ...

        def caller(arbitrary_string: str, literal_string: LiteralString) -> None:
            run_query("SELECT * FROM students")  # OK
            run_query(literal_string)  # OK
            run_query("SELECT * FROM " + literal_string)  # OK
            run_query(arbitrary_string)  # type checker error
            run_query(  # type checker error
                f"SELECT * FROM students WHERE name = {arbitrary_string}"
            )

    Only string literals and other LiteralStrings are compatible
    with LiteralString. This provides a tool to help prevent
    security issues such as SQL injection.
    rGrr3s  rwr\r\Ss0tf12
33ryc:t||d}t||fS)a>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().
     accepts only single type.rr}r
rrs   rwrrn'&zdV+E#FGDw''ryc:t||d}t||fS)aSpecial 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.
    rLrMrNs   rwrrrOryc|dk(rtdt|ts|f}dtfd|D}t|}t	|dk(r|dSt	|dk(rtd|vrt
||d	
St
||S)aUnion type; Union[X, Y] means either X or Y.

    On Python 3.10 and higher, the | operator
    can also be used to denote unions;
    X | Y means the same thing to the type checker as Union[X, 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.::

        assert Union[Union[int, str], float] == Union[int, str, float]

    - Unions of a single argument vanish, e.g.::

        assert Union[int] == int  # The constructor actually returns int

    - Redundant arguments are skipped, e.g.::

        assert Union[int, str, int] == Union[int, str]

    - When comparing unions, the argument order is ignored, e.g.::

        assert 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].
    rz Cannot take a Union of no types.z)Union[arg, ...]: each arg must be a type.c36K|]}t|ywrrrrrs  rwrzUnion.<locals>.<genexpr>s?q{1c*?rrNrname)rrtrrrrsrr
rrs  @rwrrs>R:;;j%( ]

5C?J??J%j1J
:!!}
:!T
j 8!$
DDdJ//ryct||fS)zUsed from the C implementation of TypeVar.

    TypeVar.__or__ calls this instead of returning types.UnionType
    because we want to allow unions between TypeVars and strings
    (forward references).
    r#)leftrights  rw_make_unionr]surycHt||d}t|tdfS)z,Optional[X] is equivalent to Union[X, None].z requires a single type.N)rrrs)r
rrvs   rwrrs+jTF*B"C
DCd4j!!ryc
t|}	tdttt	|D}t
||S#t
$rYwxYw)aSpecial 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.
    c3&K|]	\}}|ywrr)rr_s   rwrzLiteral.<locals>.<genexpr>s^A1^s)rrrr_value_and_type_iterrrr3s  rwrrsW2)4J
^d;OPZ;[6\)]^^
 j11

s-A	AAct|d)a:Special form for marking type aliases.

    Use TypeAlias to indicate that an assignment should
    be recognized as a proper type alias definition by type
    checkers.

    For example::

        Predicate: TypeAlias = Callable[..., bool]

    It's invalid when used anywhere except as in the example above.
    rGrr3s  rwrkrkstf12
33ryc|dk(rtdt|ts|f}|ddust|dtstddgfd|ddD|d}t	||S)	acSpecial form for annotating higher-order functions.

    ``Concatenate`` can be used in conjunction with ``ParamSpec`` and
    ``Callable`` to represent a higher-order function which adds, removes or
    transforms the parameters of a callable.

    For example::

        Callable[Concatenate[int, P], int]

    See PEP 612 for detailed information.
    rz&Cannot take a Concatenate of no types.r.zMThe last parameter to Concatenate should be a ParamSpec variable or ellipsis.z/Concatenate[arg, ...]: each arg must be a type.c36K|]}t|ywrrSrTs  rwrzConcatenate.<locals>.<genexpr>sAAK3'ArUN)rrtrrrrYs  @rwrr	sR@AAj%( ]
rNc!Z
2	%J:;	;
;CRACRAR:b>RJ#D*55ryc:t||d}t||fS)aSpecial typing construct for marking user-defined type guard functions.

    ``TypeGuard`` can be used to annotate the return type of a user-defined
    type guard function.  ``TypeGuard`` only accepts a single type argument.
    At runtime, functions marked this way should return a boolean.

    ``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
    type checkers to determine a more precise type of an expression within a
    program's code flow.  Usually type narrowing is done by analyzing
    conditional code flow and applying the narrowing to a block of code.  The
    conditional expression here is sometimes referred to as a "type guard".

    Sometimes it would be convenient to use a user-defined boolean function
    as a type guard.  Such a function should use ``TypeGuard[...]`` as its
    return type to alert static type checkers to this intention.

    Using  ``-> TypeGuard`` tells the static type checker that for a given
    function:

    1. The return value is a boolean.
    2. If the return value is ``True``, the type of its argument
       is the type inside ``TypeGuard``.

       For example::

           def is_str(val: Union[str, float]):
               # "isinstance" type guard
               if isinstance(val, str):
                   # Type of ``val`` is narrowed to ``str``
                   ...
               else:
                   # Else, type of ``val`` is narrowed to ``float``.
                   ...

    Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
    form of ``TypeA`` (it can even be a wider form) and this may lead to
    type-unsafe results.  The main reason is to allow for things like
    narrowing ``List[object]`` to ``List[str]`` even though the latter is not
    a subtype of the former, since ``List`` is invariant.  The responsibility of
    writing type-safe type guards is left to the user.

    ``TypeGuard`` also works with type variables.  For more information, see
    PEP 647 (User-Defined Type Guards).
    rLrMrNs   rwrlrl#s(\zdV+E#FGDw''rycFeZdZdZdZd
dddZdZdZd	Zd
Z	dZ
dZy)rz-Internal wrapper to hold a forward reference.)__forward_arg____forward_code____forward_evaluated____forward_value____forward_is_argument____forward_is_class____forward_module__NF)rrct|tstd||ddk(rd|d}n|}	t|dd}||_||_d	|_d|_||_	||_
||_y#t$rt	d|wxYw)
Nz*Forward reference must be a string -- got r*(z,)[0]z<string>evalz/Forward reference must be an expression -- got F)rtrurcompileSyntaxErrorrhrirjrkrlrmrn)r
rvrrqrrarg_to_compilecodes       rwrzForwardRef.__init__]s#s#HPQQ
q6S= U^N N	Y>:v>D # $%*"!%'2$$,!"(	Y OPSwWXX	Ys
A00Bc|j|vr|S|jr||ur||ix}}n	||}n||}|j5ttj
j
|jdd|}tt|j||d|j|j}t|||||jhz|_
d|_|jS)N__dict__z*Forward references must evaluate to types.)rroT)rhrjrnrsysmodulesgetrrrrirlrmrrk)r
rrrtype_s     rwrzForwardRef._evaluateus?2K))WH-DGO%''7!""&&2"KKOOD$;$;TBJPX T**Hg>< 88$($=$=	E&0x/T=Q=Q<R*R&D"*.D&%%%ryc.t|tstS|jr@|jr4|j|jk(xr|j
|j
k(S|j|jk(xr|j|jk(Sr)rtrNotImplementedrjrhrkrnr$s  rw__eq__zForwardRef.__eq__s%,!!%%%*E*E((E,A,AAF**e.E.EE
G$$(=(==D''5+C+CC	ErycDt|j|jfSr)hashrhrnrs rw__hash__zForwardRef.__hash__sT))4+B+BCDDryct||fSrr#r$s  rwr&zForwardRef.__or__r'ryct||fSrr#r$s  rwr)zForwardRef.__ror__r*rycb|jd}nd|j}d|j|dS)Nz	, module=zForwardRef())rnrh)r
module_reprs  rwrzForwardRef.__repr__s@""*K%d&=&=%@AKT114[MCCryTN)rrrrrrrrrr&r)rrryrwrrUs97'I
)u)0&4EE""DryrrreturncBt|txr
t|ddS)N#__typing_is_unpacked_typevartuple__F)rtrsrrs rw_is_unpacked_typevartuplers(At$
$
EA<eDFrycHt|ttfxst|Sr)rtrrrrs rw_is_typevar_likersa'9-.N2KA2NNryceZdZdZdZy)_PickleUsingNameMixinz/Mixin enabling pickling based on self.__name__.c|jSrrrs rwrz _PickleUsingNameMixin.__reduce__s}}ryN)rrrrrrryrwrrs
9ryrcd}t||d}t|tr|jtust|t
rt
|ddrt|d|S)N*Parameters to generic types must be types.T)rrFr{)rrtr}r~rmr	rr)r
rvrs   rw_typevar_substrsW
6C
c3D
1C	C	'CNNf,D	C	&73+N3%=>??Jryc	|j}|j|}||dzdD] }t|tst	d|t|}t|}|}||z
dz
}	d}
d}t
|D]Q\}}
t|
trt|
dd}|s't|dk(s6|ddus>|
t	d|}
|d}S|
t||
}t|	||
z
dz
}	n||	z|kDrt	d	|d
|d|dz
g|d||g||z
zt||||	z
|g||	z
|z
|z
dz
z|||	z
dS)NrVz(More than one TypeVarTuple parameter in rrr.z6More than one unpacked arbitrary-length tuple argumentrToo few arguments for rz, expected at least )rindexrtr
rr	enumeratersrminr)r
aliasrrtypevartuple_indexparamrplenr[r\var_tuple_indexfillargkrvrs               rw_typevartuple_prepare_substrs

!
!Fd+*Q./0Pe\*FugNOOPt9Dv;DD%%)EOGD/%3#t$c#CTJG3w<1,1C".#$\]]"#!!*%"4)E4/1A56	
	08##'&(<T!VHFG	G	
et)'$.
/	d4&')TE\D(+==A
B	

dUlm	ryct|ttfrtd|D}|St|st	d||S)Nc34K|]}t|dyw)zExpected a type.NrSrrs  rwrz#_paramspec_subst.<locals>.<genexpr>sD1K#56DzFExpected a list of types, an ellipsis, ParamSpec, or Concatenate. Got )rtrrrrr
rvs  rw_paramspec_substrsU#e}%DDDJC
 ::=@A	AJryc|j}|j|}|t|k\rtd|t|dk(rt	|ds|f}|St||trg|d|t||||dzd}|S)NrrVr)rrrrrrtrr)r
rrris     rw_paramspec_prepare_substrs

!
!FTACI~0899
6{atAw 7wK
DGT	"7bq75a>7D1J7Kryct|ts|f}td|D}|ttfv}|r|st	d|j
dt
d|Dst	d|jdtt|t|k7rt	d|jd|jD]}t|dd	}||||}t||t|jg}t|j|D]8\}}t|tr|j|(|j!|:t|}t#||S)
aParameterizes a generic class.

    At least, parameterizing a generic class is the *main* thing this method
    does. For example, for some generic class `Foo`, this is called when we
    do `Foo[int]` - there, with `cls=Foo` and `params=int`.

    However, note that this method is also called when defining generic
    classes in the first place with `class Foo(Generic[T]): ...`.
    c32K|]}t|ywrrxrrs  rwrz)_generic_class_getitem.<locals>.<genexpr>
s4=#4rzParameter list to z[...] cannot be emptyc32K|]}t|ywr)rrs  rwrz)_generic_class_getitem.<locals>.<genexpr>s71#A&7rzParameters to zF[...] must all be type variables or parameter specification variables.z[...] must all be unique__typing_prepare_subst__N)rtrrrrrallrrrrrrzipr
rrr})rris_generic_or_protocolrpreparenew_argsnew_args       rw_generic_class_getitemrsufe$
4V4
4F Wh$77$S%5%5$66KL
777 /89:
:s6{s6{* .FGI
I''	.Ee%?FG" f-	.	sFC(:(:$;<!#"4"4f=	)NE7%.((		)
xf%%ryc
tt|
|i|g}d|jvrt|jv}n7t|j
vxr#|jdk7xrt|tk7}|rtdd|jvrt|j}d}|jD]?}t|ts|jtus'|td|j}A|at|}t|
|
ksDdj!
fd|D}dj!d|D}	td|d	|	d
|}t#||_y)N__orig_bases__rz!Cannot inherit from plain Genericz0Cannot inherit from Generic[...] multiple times.rc3>K|]}|vst|ywrru)rrgvarsets  rwrz)_generic_init_subclass.<locals>.<genexpr>Ns"MaAW<L3q6"Ms	c32K|]}t|ywrr)rgs  rwrz)_generic_init_subclass.<locals>.<genexpr>Os"9a3q6"9rzSome type variables (z) are not listed in Generic[r)r;rrrxr	__bases__rrs_TypedDictMetarrrtr}r~rrrr)rrrDtvarserrorgvarsbasetvarsets_varss_argsrs          @rw_generic_init_subclassr0sq	'3)4:6:E3<<'3---CMM)0LLJ.0I/	
;<<3<<'#C$6$67&&	,D4/OOw.$#JLL++
	,%jG%jGg%"M5"MM"95"99"7x@::@!DEEEuCrycJ|jdxr|jdS)N__)
startswithendswith)attrs rw
_is_dunderrVs??4 8T]]4%88rycXeZdZdZddddZdZdZdZfd	Zd
Z	dZ
fdZxZS)
_BaseGenericAliasaThe central part of the 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.
    TNinstrXc<||_||_||_d|_yr)_instrr~r)r
originrrXs    rwrz_BaseGenericAlias.__init__cs

 ryc|js0td|jd|jjd|j|i|}	||_|S#t$rY|SwxYw)NzType z cannot be instantiated; use z
() instead)rrrr~r__orig_class__r)r
rrDresults    rwr!z_BaseGenericAlias.__call__iszzeDJJ<0##'??#;#;"<JHI
I $1&1	$(F!
	
	sA	A&%A&c,g}|j|vr|j|j|j|}||dzdD].}t|tst|ts$t|S|jtt|S)NrV)r~rrrtr
issubclassrr)r
rresrbs     rwrz!_BaseGenericAlias.__mro_entries__ts??%'JJt'KKqst	 A!./:a3ISz	 
JJwSzryc|dvr$|jxs|jjSd|jvr!t	|st|j|St
|)N>rrr~)rr~rrxrrr)r
rs  rwrz_BaseGenericAlias.__getattr__sU//::9!9!994==(D1A4??D11T""ryctt|s|dvrt|	||yt|j||y)N>rr_nparams)rr;__setattr__setattrr~)r
rvalr<s   rwrz_BaseGenericAlias.__setattr__s2dt'EEGc*DOOT3/ryc6|jt|Srr1rsr,s  rwr-z#_BaseGenericAlias.__instancecheck__%%d3i00ryctd)NzBSubscripted generics cannot be used with class and instance checksrr0s  rwr1z#_BaseGenericAlias.__subclasscheck__s56	6rycttt|
t	|j
Dcgc]}t
|r|c}zScc}wr)rrr;__dir__dirr~rr
rr<s  rwrz_BaseGenericAlias.__dir__sJC)$'$8QD
4@P4QRST	TQsAA)
rrrrrr!rrrr-r1rr>r?s@rwrrYs>(,$	
#016TTryrc|eZdZdddfd
ZdZdZdZdZed	Z	d
Z
dZdZd
Z
dZfdZdZxZS)r}TNrct||||t|ts|f}td|D|_t||_|s|j|_yy)Nrc34K|]}|turdn|yw).N)_TypingEllipsisrs  rwrz)_GenericAlias.__init__.<locals>.<genexpr>s'/$%&'/%9c /r)r;rrtrrrrr)r
rrrrXr<s     rwrz_GenericAlias.__init__sc
d6$&7D/)-//
1$7$//DOryct|tstS|j|jk(xr|j|jk(Sr)rtr}r~r~rr$s  rwrz_GenericAlias.__eq__s>%/!!5#3#334MMU^^3	5rycDt|j|jfSr)rr~rrs rwrz_GenericAlias.__hash__sT__dmm455ryct||fSrr#r
r\s  rwr&z_GenericAlias.__or__r'ryct||fSrr#r
r[s  rwr)z_GenericAlias.__ror__T4Z  ryc*|jttfvrtd||jst|dt|ts|f}t
d|D}t|}|j|}|j|}|S)Nz%Cannot subscript already-subscripted rc32K|]}t|ywrrrs  rwrz,_GenericAlias.__getitem__.<locals>.<genexpr>s4!]1%4r)
r~rrrrrtrr_determine_new_argsr)r
rrrs    rwr4z_GenericAlias.__getitem__s"??w11CD6JKK""tf$;<==$&7D4t44D!++D1NN8$ryc
@|j}|D]}t|dd}||||}t|}t|}||k7rtd||kDrdndd|d|d|t	t||}t
|j|j|S)Nrrrrrrr)	rrrrdictrr_make_substitutionr)r
rrrrrrnew_arg_by_params        rwrz!_GenericAlias._determine_new_argss$$	+Ee%?FG"tT*	+4y6{4<dTD[6e"DOTXSYZ''+fKv?@
@FD 12T,,T]]<LMNNryc	g}|D]V}t|tr|j|&t|dd}|r|||}nbt|dd}|s|}nPg}|D];}	t|	tr|j||	(|j||	=|t
|}|jtjjk(r"t|tr|j|t|r|j|
t|tr,|jt
|j||F|j|Y|S)z$Create a list of new type arguments.rNrr)
rtrsrrr
rrr~rrrrr)
r
rrrold_arg	substfuncr	subparamsrrs
          rwrz _GenericAlias._make_substitutionsE8	)G'4(();TBI#$4W$=>#G-=rB	 %G G&@%a6#NN+;A+>?#NN+;A+>?	@
&eGn5G+//":"::z'SX?Y(*73(GU+$11';KLM(q8	)rrych|j|j||j|jSN)rXr)r<r~rrr
rs  rwrz_GenericAlias.copy_withTs%~~doot$**4::~VVryc|jrd|jz}nt|j}|jr3dj	|jDcgc]
}t|c}}nd}|d|dScc}w)Nrrz()rr)rrr~rr)r
rXrrs    rwrz_GenericAlias.__repr__Wsm::tzz)Ddoo.D==99T]]CjmCDDDqa  	DsA;c|jrt|j}n|j}t|j}t|dk(rt
|dts|\}tj||ffS)NrVr)	rglobalsr~rrrrtrr)r
rrs   rwrz_GenericAlias.__reduce__csd::Ytzz*F__FT]]#t9>*T!We"<ED&$//rycDt|jtrtd||jrt
||S|jtur>t|vry|j|}||dzdD]}t|ts||usy|jfS)NrrrV)rtr~rrrr;rrrrr)r
rrrr<s    rwrz_GenericAlias.__mro_entries__msdoo|4.th788::7*511??g%5 D!A1Q34[
a!23

!!ryc#"Kt|ywr)rmrs rwrz_GenericAlias.__iter__|sTls
)rrrrrrr&r)rr4rrrrrrrr>r?s@rwr}r}s]2.2056"!>O:<|W
!0
"ryr}c^eZdZdddfd
ZedZdZdZfdZd	Z	d
Z
dZxZS)_SpecialGenericAliasTNrc||j}t|	|||||_|jdk(rd|j
d|_yd|jd|j
d|_y)NrrzA generic version of r|)rr;rrrrr)r
rnparamsrrXr<s     rwrz_SpecialGenericAlias.__init__sv<??D
d6

*263F3F2GqIDL263D3D2EQvGZGZF[[\]DLryct|ts|f}dtfd|D}t|||j|j	|S)Nrc36K|]}t|ywrrSrTs  rwrz3_SpecialGenericAlias.__getitem__.<locals>.<genexpr>;q{1c*;rU)rtrrrrr
rrs  @rwr4z _SpecialGenericAlias.__getitem__sH&%(YF:;F;;tVT]]3~~f%%ryc\t|j||j|jSr)r}r~rrr
rs  rwrz_SpecialGenericAlias.copy_withs$T__f"&**4::?	?ryc d|jzSrrrs rwrz_SpecialGenericAlias.__repr__rryct|tr t|j|jSt|tst||jSt
||Sr)rtrrr~r}r;r1)r
rr<s  rwr1z&_SpecialGenericAlias.__subclasscheck__sNc/0cnndoo>>#}-c4??33w(--ryc|jSrrrs rwrz_SpecialGenericAlias.__reduce__rryct||fSrr#rs  rwr&z_SpecialGenericAlias.__or__r'ryct||fSrr#rs  rwr)z_SpecialGenericAlias.__ror__rry)
rrrrrr4rrr1rr&r)r>r?s@rwrrs@044^&&?&."!ryrc0eZdZdddfd
ZfdZxZS)_DeprecatedGenericAliasTNrc:t|||||||_y)Nr)r;r_removal_version)r
rrremoval_versionrrXr<s      rwrz _DeprecatedGenericAlias.__init__s#	t$? /rycddl}|j|jd|j|jt
||S)Nrr|)r)warnings_deprecatedrrrr;r-)r
rr"r<s   rwr-z)_DeprecatedGenericAlias.__instancecheck__sGq-d6K6K	
w(..ry)rrrrr-r>r?s@rwrrs8<40//ryrc$eZdZfdZdZxZS)_CallableGenericAliasc	|j}t|dk(rt|drt|Sddj|ddDcgc]
}t
|c}dt
|ddScc}w)Nrrztyping.Callable[[rrz], r)rrrr;rrr)r
rrr<s   rwrz_CallableGenericAlias.__repr__sy}}t9>nT!W57#%%YYtCRyA!
1
ABC3d2h'(+	,AsA6
c|j}t|dk(rt|dst|dd|df}tj
t|ffS)Nrrr)rrrrrrrrs  rwrz _CallableGenericAlias.__reduce__sO}}D	Q>$q'#:Sb	?DH,D(D!111ry)rrrrrr>r?s@rwr%r%s
,2ryr%c(eZdZdZdZedZy)
_CallableTypec\t|j||j|jSr)r%r~rrrs  rwrz_CallableType.copy_withs&$T__f*.**4::G	Gryct|trt|dk7rtd|\}}t|trt||f}n||f}|j|S)Nrz6Callable must be used as Callable[[arg, ...], result].)rtrrrr__getitem_inner__)r
rrrs    rwr4z_CallableType.__getitem__sf&%(CK1,<<=
=fdD!Dk6*FF^F%%f--ryc|\}}d}t||}|tur|jt|fSt	|t
s|f}td|D}||fz}|j|S)Nz.Callable[args, result]: result must be a type.c32K|]}t|ywrrrs  rwrz2_CallableType.__getitem_inner__.<locals>.<genexpr>s8C]3'8r)rEllipsisrrrtr)r
rrrrs     rwr,z_CallableType.__getitem_inner__stf>VS)8>>?F";<<$&7D8488	!~~f%%ryN)rrrrr4rr,rryrwr)r)s!G.
&
&ryr)ceZdZedZy)
_TupleTypect|ts|f}t|dk\r:|ddur3dtfd|ddD}|jg|tSdtfd|D}|j|S)Nrr.z Tuple[t, ...]: t must be a type.c36K|]}t|ywrrSrTs  rwrz)_TupleType.__getitem__.<locals>.<genexpr>sD1;q#.DrUz*Tuple[t0, t1, ...]: each t must be a type.c36K|]}t|ywrrSrTs  rwrz)_TupleType.__getitem__.<locals>.<genexpr>rrU)rtrrrrrs  @rwr4z_TupleType.__getitem__s&%(YFv;!r
c 14CDsDDF>>"<F"<O"<==:;F;;~~f%%ryN)rrrrr4rryrwr1r1s	&	&ryr1cFeZdZdZdZdZfdZdZdZfdZ	xZ
S)rct|Srr#rs  rwrz_UnionGenericAlias.copy_withsV}ryct|ttjfstSt|jt|jk(Sr)rtrrrr~rrr$s  rwrz_UnionGenericAlias.__eq__s9%"4eoo!FG!!4==!S%888ryc>tt|jSr)r	frozensetrrs rwrz_UnionGenericAlias.__hash__sIdmm,--ryc|j}t|dk(rD|dtdurdt|ddS|dtdurdt|ddSt|S)Nrrztyping.Optional[rVr)rrrsrr;rr
rr<s  rwrz_UnionGenericAlias.__repr__sw}}t9>Aw$t*$)*T!W*=)>a@@aDJ&)*T!W*=)>a@@w!!ryc6|jt|Srrr,s  rwr-z$_UnionGenericAlias.__instancecheck__rrycB|jD]}t||syy)NT)rr)r
rrvs   rwr1z$_UnionGenericAlias.__subclasscheck__s"==	C#s#	ryc@t|\}\}}|t|ffSr)r;rr)r
rrrr<s    rwrz_UnionGenericAlias.__reduce__s($w13nvteT]""ry)rrrrrrrr-r1rr>r?s@rwrrs+9
."1
##ryrcd|DS)Nc36K|]}|t|fywr)rsrs  rwrz'_value_and_type_iter.<locals>.<genexpr>"s-QQQL-sr)rs rwrbrb!s
-*--ryceZdZdZdZy)rct|tstStt	|j
tt	|j
k(Sr)rtrr~rrbrr$s  rwrz_LiteralGenericAlias.__eq__&s?%!56!!'

673?STYTbTb?c;dddrycPttt|jSr)rr9rbrrs rwrz_LiteralGenericAlias.__hash__,sI24==ABCCryN)rrrrrrryrwrr%seDryrceZdZfdZxZS)rct|dttfr
g|dd|dSt|dtrg|dd|dj}t
||S)Nr)rtrrrrr;r)r
rr<s  rwrz"_ConcatenateGenericAlias.copy_with1smfRj4-0.VCR[.6":..fRj":;9vcr{9VBZ%8%89Fw ((ry)rrrrr>r?s@rwrr0s
))ryrc<t||d}t||fS)aType unpack operator.

    The type unpack operator takes the child types from some container type,
    such as `tuple[int, str]` or a `TypeVarTuple`, and 'pulls them out'.

    For example::

        # For some generic class `Foo`:
        Foo[Unpack[tuple[int, str]]]  # Equivalent to Foo[int, str]

        Ts = TypeVarTuple('Ts')
        # Specifies that `Bar` is generic in an arbitrary number of types.
        # (Think of `Ts` as a tuple of an arbitrary number of individual
        #  `TypeVar`s, which the `Unpack` is 'pulling out' directly into the
        #  `Generic[]`.)
        class Bar(Generic[Unpack[Ts]]): ...
        Bar[int]  # Valid
        Bar[int, str]  # Also valid

    From Python 3.11, this can also be done using the `*` operator::

        Foo[*tuple[int, str]]
        class Bar(Generic[*Ts]): ...

    And from Python 3.12, it can be done using built-in syntax for generics::

        Foo[*tuple[int, str]]
        class Bar[*Ts]: ...

    The operator can also be used along with a `TypedDict` to annotate
    `**kwargs` in a function signature::

        class Movie(TypedDict):
            name: str
            year: int

        # This function expects two keyword arguments - *name* of type `str` and
        # *year* of type `int`.
        def foo(**kwargs: Unpack[Movie]): ...

    Note that there is only some runtime checking of this operator. Not
    everything the runtime allows may be accepted by static type checkers.

    For more information, see PEPs 646 and 692.
    rL)rr)r_UnpackGenericAliasrNs   rwrmrm9s(^zdV+E#FGDd$99rycDeZdZdZfdZedZedZxZS)rGc:dt|jddS)Nztyping.Unpack[rr)rrrs rwrz_UnpackGenericAlias.__repr__ms" 
4==+; <=Q??ryc>|jr|St|	|Sr)rr;r4r;s  rwr4z_UnpackGenericAlias.__getitem__rs!33Kw"4((rycX|j\}t|tr|jSyr)rrtr}rs  rwrz2_UnpackGenericAlias.__typing_unpacked_tuple_args__ws&}}c=)<<ryc<t|jdtSNr)rtrr
rs rwrz7_UnpackGenericAlias.__typing_is_unpacked_typevartuple__s$--*L99ry)	rrrrr4propertyrrr>r?s@rwrGrGls6@
)
::ryrGceZdZdZy)rz(Internal placeholder for ... (ellipsis).N)rrrrrryrwrrs2ryr>_is_protocolrrr__type_params____protocol_attrs___is_runtime_protocol__callable_proto_members_only__>rrBrxrrrr__annotations____subclasshook____class_getitem____abstractmethods___MutableMapping__markerct}|jddD]`}|jdvrt|di}g|j|D].}|jdr|tvs|j|0b|S)zCollect 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.
    Nr>rrrU_abc_)r__mro__rrrxrEXCLUDED_ATTRIBUTESadd)rattrsrannotationsrs     rw_get_protocol_attrsras
EECR  ==33d$5r:2dmm2k2	 D??7+<O0O		$	 	 LrycHt|}|jrtd|jtury|j
D]3}|jjdt}|tus,||_ntj|_|j|g|i|y)Nz Protocols cannot be instantiatedr)	rsrPrr_no_init_or_replace_initr\rxr{object)r
rrDrrinits      rwrcrcs
t*C
:;;||33'}}  -EF//CL	'CLL'''ryrVc	tj|dzxs|S#t$rYnwxYw	tj|dzjjd|S#ttf$rYywxYw)NrVr)ry_getframemodulenamer	_getframe	f_globalsr{
ValueError)depthdefaults  rw_callerrmsx
&&uqy1<W<


}}UQY'1155j'JJJ'

s	**1A  A21A2rct|dvS)zAllow 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.
    >Nrr)rm)rks rw_allow_reckless_class_checksros5>777ry)rr0r%r&r2r#r.r!r4r7BufferAbstractContextManagerAbstractAsyncContextManager)zcollections.abc
contextlibcddlm}|S)Nrgetattr_static)inspectrvrus rw_lazy_load_getattr_staticrxs
'ryc(t|jffSr)rr~)psargss rw_pickle_psargsr{s6,,...ryc(t|jffSr)rr~)pskwargss rw_pickle_pskwargsr~sX00222ryc<eZdZfdZfdZfdZfdZxZS)
_ProtocolMetac6|dk(r|tfk(rnvt|vrn|D]i}|tthvr|jtj|jgvr?t|trt|ddr]td|t|,||||fi|S)NrrPFz5Protocols can only inherit from other protocols, got )rrrdr_PROTO_ALLOWLISTr{rrrrr;rB)mclsrXr	namespacerDrr<s      rwrBz_ProtocolMeta.__new__s:%G:"5


VW--}}(8(<(<T__b(QQ"41#D.%@$#h(
wtT5)FvFFryct|i|tddr4t_tfdjD_yy)NrPFc3JK|]}tt|dywr)callabler)rrrs  rwrz)_ProtocolMeta.__init__.<locals>.<genexpr>s$67;dD126s #)r;rrrarRrrTrCs`  rwrz_ProtocolMeta.__init__sU
$)&)3.%8%=C"366?B?U?U63C/	/rycb|turtj||St|ddrut	skt|tst
d|js,|jjdturt
dt|ddst
dt|	|S)NrPFz"issubclass() arg 1 must be a classrVz<Protocols with non-method members don't support issubclass()rSLInstance and class checks can only be used with @runtime_checkable protocols)rrsr1rrortrrTrxr{_proto_hookr;)rr%r<s  rwr1z_ProtocolMeta.__subclasscheck__s(?))#u55C/02eT* DEE77LL$$%78KGR3 6>3w(//ryc~|turtj||St|ddst|	|St|ddstst
dt|	|ryt}|jD]'}	|||}|tt||ds'yy#t$rYywxYw)NrPFrSrT)rrsr-rr;rorrxrRrr)rinstancervrrr<s     rwr-z_ProtocolMeta.__instancecheck__6s(?))#x88sNE27,X663U;,.<=
=7$X.24**	D
$Xt4{xT4(@A	"

s	B//	B<;B<)rrrrBrr1r-r>r?s@rwrrsG&00ryrc|jjddstS|jD]}|jD]}||jvr|j|
tccS;t|di}t
|tjjs^||vsct|tstt|ddstcSy)NrPFrUT)rxr{r~rRr\rrtrrr(rr)rr%rrr`s     rwrrWs<<NE2&&"MM	"Dt}}$==&.))"$(92>K;(?(?@K'ug.75.RW3X	""!" ryc.eZdZdZdZdZdZfdZxZS)ra_Base 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[T](Protocol):
            def meth(self) -> T:
                ...
    rTFc:t||i||jjdds!t	d|j
D|_d|jvrt|_|jr)|jtjurt|_	yyy)NrPFc3,K|]}|tuywrrrrs  rwrz-Protocol.__init_subclass__.<locals>.<genexpr>s"HQ1="HsrV)r;rrxr{anyrrPrrVrrrcrCs   rwrzProtocol.__init_subclass__s
!4262||6""H#--"HHCS\\1#.C 0A0A A3CL!Bry)	rrrrrrPrSrr>r?s@rwrros%@IL 
4
4ryrcPeZdZdZfdZdZdZdZdZdZ	fdZ
d	ZxZS)
_AnnotatedAliasaRuntime 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.

    The metadata itself is stored in a '__metadata__' attribute as a tuple.
    ct|tr|j|z}|j}t|||d||_y)NrrW)rtr__metadata__r~r;r)r
rmetadatar<s   rwrz_AnnotatedAlias.__init__sDfo.**X5H&&F
k:$ryc8|d}t||jSrM)rr)r
rnew_types   rwrz_AnnotatedAlias.copy_withs!9x):):;;rycdjt|jdjd|jDS)Nztyping.Annotated[{}, {}]rc32K|]}t|ywr)rrs  rwrz+_AnnotatedAlias.__repr__.<locals>.<genexpr>s9!d1g9r)formatrr~rrrs rwrz_AnnotatedAlias.__repr__s9)00t'II9t'8'899
	
rycbtjt|jf|jzffSr)rrrr~rrs rwrz_AnnotatedAlias.__reduce__s1)D,=,=="

	
ryct|tstS|j|jk(xr|j|jk(Sr)rtrr~r~rr$s  rwrz_AnnotatedAlias.__eq__sB%1!!5#3#33<%%););;	=rycDt|j|jfSr)rr~rrs rwrz_AnnotatedAlias.__hash__sT__d&7&7899ryc,|dvryt||S)N>rrr)r;rrs  rwrz_AnnotatedAlias.__getattr__s//w"4((ryc|jfSr)r~rs  rwrz_AnnotatedAlias.__mro_entries__s!!ry)
rrrrrrrrrrrrr>r?s@rwrrs0%<



=:)
"ryrc0eZdZdZdZdZedZdZy)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.
    - Access the metadata via the ``__metadata__`` attribute::

        assert Annotated[int, '$'].__metadata__ == ('$',)

    - Nested Annotated types are flattened::

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

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

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

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

        type Optimized[T] = Annotated[T, runtime.Optimize()]
        # type checker will treat Optimized[int]
        # as equivalent to Annotated[int, runtime.Optimize()]

        type OptimizedList[T] = Annotated[list[T], runtime.Optimize()]
        # type checker will treat OptimizedList[int]
        # as equivalent to Annotated[list[int], runtime.Optimize()]

    - Annotated cannot be used with an unpacked TypeVarTuple::

        type Variadic[*Ts] = Annotated[*Ts, Ann1]  # NOT valid

      This would be equivalent to::

        Annotated[T1, T2, T3, ..., Ann1]

      where T1, T2 etc. are TypeVars, which would be invalid, because
      only one type should be passed to Annotated.
    rctd)Nz&Type Annotated cannot be instantiated.rrrrDs   rwrBzAnnotated.__new__
s@AAryct|trt|dkrtdt	|drtdd}t|d|d}t|dd}t
||S)	NrzUAnnotated[...] should be used with at least two arguments (a type and an annotation).rz?Annotated[...] should not be used with an unpacked TypeVarTuplez$Annotated[t, ...]: t must be a type.TrnrV)rtrrrrrr)rrrrrs     rwrWzAnnotated.__class_getitem__
s|&%(CK!O+,
,%VAY/45
54VAYF$vx00rycJtdj|j)NzCannot subclass {}.Annotated)rrrrs   rwrzAnnotated.__init_subclass__s!*11#..A
	
ryN)	rrrrrrBrrWrrryrwrrs.-^IB11
ryrcjt|tr
t|ddstd|zd|_|S)a:Mark 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!
    rPFzB@runtime_checkable can be only applied to protocol classes, got %rT)rrrrrS)rs rwrgrg!s@&c7#73+N"$'()	)#CJryc|S)zCast 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)rrs  rwrSrS;s	Jryc|S)aAsk a static type checker to confirm that the value is of the given type.

    At runtime this does nothing: it returns the first argument unchanged with no
    checks or side effects, no matter the actual type of the argument.

    When a static type checker encounters a call to assert_type(), it
    emits an error if the value is not of the specified type::

        def greet(name: str) -> None:
            assert_type(name, str)  # OK
            assert_type(name, int)  # type checker error
    r)rrs  rwrQrQFs	JrycTt|ddriSt|tr4i}t|jD]}|6tt
jj|jddi}n|}|jjdi}t|tjri}|tt|n|}||||}}|jD]B\}	}
|
td}
t|
trt!|
dd}
t#|
||}
|
||	<D|r|S|jDcic]\}}|t%|c}}S|`t|tj&r
|j}n4|}
t)|
dr|
j*}
t)|
drt|
d	i}||}n||}t|dd}|,t|t,riSt/d
j1|t|}|jD]Y\}	}
|
td}
t|
tr't!|
t|tj&d}
t#|
||||	<[|r|S|jDcic]\}}|t%|c}}Scc}}wcc}}w)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 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.  For classes, the search
      order is globals first then locals.

    - 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__NrxrUFT)rrr__wrapped____globals__z1{!r} is not a module, class, method, or function.)rrtrsreversedr\ryrzr{rrxrGetSetDescriptorTypervarsitemsrurr_strip_annotations
ModuleTyperr_allowed_typesrr)rrrinclude_extrashintsrbase_globalsannbase_localsrXvaluerrnsobjs              rwrZrZ[s>s'.	#tS[[)	$D&s{{t'Mz[]^'--##$5r:C#u99:.5o$tDz*7K8#3-8k"yy{
$e= JEeS)&u%$OE"5,D#d

$#	$0'u`RWR]R]R_,`$!QQ0B10E-E,``c5++,||HE%/))%/umR8H?G	C*D1E}c>*I++16#;8
8KE{{};e=JEeS! *30@0@ AAE
!':d;#5\ekkm(\da,>q,A)A(\\I-aH)]s;JJ$ct|trt|jSt	|dr0|jt
tfvrt|jdSt|tr>td|jD}||jk(r|S|j|St|trCtd|jD}||jk(r|St|j|St|tjrQtd|jD}||jk(r|Stjt j"|S|S)z(Strip the annotations from a given type.r~rc32K|]}t|ywrrrs  rwrz%_strip_annotations.<locals>.<genexpr>H03Hrc32K|]}t|ywrrrs  rwrz%_strip_annotations.<locals>.<genexpr>rrc32K|]}t|ywrrrs  rwrz%_strip_annotations.<locals>.<genexpr>rr)rtrrr~rrerbrr}rrr	rrrrrr)r
stripped_argss  rwrrs!_%!!,,//q,ALLX{4K$K!!**Q-00!]#HQZZHH
AJJ&H{{=))!\"HQZZHH
AJJ&HALL-88!U__%HQZZHH
AJJ&Hm<<Hryct|trtSt|ttt
tfr|jS|turtSt|tjrtjSy)aPGet the unsubscripted version of a type.

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

    Examples::

        assert get_origin(Literal[42]) is Literal
        assert get_origin(int) is None
        assert get_origin(ClassVar[int]) is ClassVar
        assert get_origin(Generic) is Generic
        assert get_origin(Generic[T]) is Generic
        assert get_origin(Union[T, int]) is Union
        assert get_origin(List[Tuple[T, T]][int]) is list
        assert get_origin(P.args) is P
    N)rtrrrr	rrr~rrrtps rwrXrXs^""o&"(,$o78}}	W}"eoo&ryc*t|tr|jf|jzSt|tt
fr-|j}t||rt|dd|df}|St|tjr|jSy)aGet type arguments with all substitutions performed.

    For unions, basic simplifications used by Union constructor are performed.

    Examples::

        assert get_args(Dict[str, int]) == (str, int)
        assert get_args(int) == ()
        assert get_args(Union[int, Union[T, int], str][int]) == (int, str)
        assert get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
        assert get_args(Callable[[], T][int]) == ([], int)
    Nrr)rtrr~rr}r	rrrrr)rrs  rwrWrWs~"o&

"//11"}l34kk*2s3CR>3r7+C
"eoo&{{
ryc"t|tS)zCheck if an annotation is a TypedDict class.

    For example::

        class Film(TypedDict):
            title: str
            year: int

        is_typeddict(Film)              # => True
        is_typeddict(Union[list, str])  # => False
    )rtrrs rwr[r[
	sb.))rydrvcpt|}t|tkDr|dtdz}td|)aStatically assert that a line of code is unreachable.

    Example::

        def int_or_str(arg: int | str) -> None:
            match arg:
                case int():
                    print("It's an int")
                case str():
                    print("It's a str")
                case _:
                    assert_never(arg)

    If a type checker finds that a call to assert_never() is
    reachable, it will emit an error.

    At runtime, this throws an exception when called.
    Nrz*Expected code to be unreachable, but got: )rr_ASSERT_NEVER_REPR_MAX_LENGTHAssertionError)rvrs  rwrRrR	s@&
IE
5z11445=
EeWM
NNryct|trt|D]}t||}t	|drB|j
|j
d|jk7st|dd|jk7r^t|tjrd|_
t|tjrd|j_
t|tst|	d|_
|S#t$rY|SwxYw)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.
    rr|rNT)rtrsrrrrrrrrr
MethodType__func__r_r)rvkeyrs   rwr_r_8	s#ts8	#C#s#CC0###*:*:);1S\\N'KK3d3s~~E
#u112(,%#u//015.#t$c"%	#&
 $J
J
s%C..	C;:C;cBtjfd}|S)zDecorator 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.|i|}t|}|Sr)r_)rrrrs   rwwrapped_decoratorz2no_type_check_decorator.<locals>.wrapped_decoratorb	s!$'$'T"ry)rr)rrs` rwr`r`\	s(__Y 
ryctd)z*Helper for @overload to raise when called.zYou should not call an overloaded function. A series of @overload-decorated functions outside a stub module should always be followed by an implementation that is not @overload-ed.)NotImplementedError)rrs  rw_overload_dummyrk	s
	9::ryct|d|}	|t|j|j|jj
<tS#t$rYtSwxYw)aDecorator 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::

        @overload
        def utf8(value: None) -> None: ...
        @overload
        def utf8(value: bytes) -> bytes: ...
        @overload
        def utf8(value: str) -> bytes: ...
        def utf8(value):
            ...  # implementation goes here

    The overloads for a function can be retrieved at runtime using the
    get_overloads() function.
    r)r_overload_registryrr__code__co_firstlinenorr)rfs  rwrcrcx	sa@	j$'A
VZ1<<(89R9RS

s7A	AAct|d|}|jtvrgSt|j}|j|vrgSt	||jjS)z6Return all defined overloads for *func* as a sequence.r)rrrrrvalues)rrmod_dicts   rwrYrY	s`	j$'A||--	!!,,/H~~X%	(//122ryc,tjy)z$Clear all overloads in the registry.N)rclearrryrwrTrT	srycB	d|_|S#ttf$rY|SwxYw)aDecorator 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. The decorator
    attempts to set the ``__final__`` attribute to ``True`` on the decorated
    object to allow runtime introspection.
    T)	__final__rr)rs rwrVrV	s54

H
I&
	
H
TKTVTT_co)	covariantV_coVT_coT_contra)
contravariantCT_co)rboundrPaDeprecated alias to collections.abc.Callable.

    Callable[[int], str] signifies a function that takes a single
    parameter of type int and returns a 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, a ParamSpec,
    Concatenate 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.
    rrW)r)r rrra]Deprecated alias to builtins.tuple.

    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, ...].
    rDrArFrGr"r6rBrCraDeprecated alias to builtins.type.

    builtins.type or typing.Type can be used 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::

        def new_user[U](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*eZdZdZdZedefdZy)r=z(An ABC with one abstract method __int__.rrcyrrrs rw__int__zSupportsInt.__int__N
ryN)rrrrrrintrrryrwr=r=H
s#2I


ryr=c*eZdZdZdZedefdZy)r;z*An ABC with one abstract method __float__.rrcyrrrs rw	__float__zSupportsFloat.__float__Y
rryN)rrrrrrfloatrrryrwr;r;S
#4I
5

ryr;c*eZdZdZdZedefdZy)r:z,An ABC with one abstract method __complex__.rrcyrrrs rw__complex__zSupportsComplex.__complex__d
rryN)rrrrrrcomplexrrryrwr:r:^
s#6I
W

ryr:c*eZdZdZdZedefdZy)r9z*An ABC with one abstract method __bytes__.rrcyrrrs rw	__bytes__zSupportsBytes.__bytes__o
rryN)rrrrrrbytesrrryrwr9r9i
rryr9c*eZdZdZdZedefdZy)r<z*An ABC with one abstract method __index__.rrcyrrrs rw	__index__zSupportsIndex.__index__z
rryN)rrrrrrrrrryrwr<r<t
s#4I
3

ryr<c>dxfGfdd
}t|S)rc4eZdZWZdZdZedWfdZy)r8zMAn ABC with one abstract method __abs__ that is covariant in its return type.rrcyrrrs rw__abs__zSupportsAbs.__abs__
rryN)rrrrQrrrr	.type_paramsrsrwr8r8
s$WI


ryr8r
.generic_baserrs @@rw#<generic parameters of SupportsAbs>r
s

X
ryc>dxfGfdd
}t|S)rc:eZdZWZdZdZeddedWfdZy)r>zOAn ABC with one abstract method __round__ that is covariant in its return type.rndigitsrcyrr)r
rs  rw	__round__zSupportsRound.__round__
rryNr)	rrrrQrrrrrr
srwr>r>
s+YI

Q

ryr>rrs @@rw%<generic parameters of SupportsRound>r
s

x
ryrc|Dcgc]\}}|	}}}|Dcic]\}}|t|d|d}}}tj||||}|x|_|j_|Scc}}wcc}}w)Nzfield z annotation must be a typedefaultsrq)rr
namedtuplerUrB)rXrrqrnrfieldsnm_tpls        rw
_make_nmtupler
s!
"DAqa
"F
"
 AAs*DEF
F
 E
 

#
#D&-5fFF>CCFV^^;M
#
 s
A+A1>
_makerB_asdict_fields_sourcer_replacer__getnewargs___field_defaults>rrrUceZdZdZy)NamedTupleMetac|D]}|tus|tustdtd|D}|j	di}g}|D]M}||vr|j||std|dt
|dkDrdndd	d
j|t||j|Dcgc]}||	c}|d}	||	_
t|vrt}
t|
|	_
|D]@}|tvrtd
|z|t vs"||	j"vs1t%|	|||Bt|vr|	j'|	Scc}w)Nz3can only inherit from a NamedTuple type and Genericc3<K|]}|turtn|ywr)_NamedTupler)rrs  rwrz)NamedTupleMeta.__new__.<locals>.<genexpr>
sOt{2e<OrUzNon-default namedtuple field z cannot follow default fieldrVsr rrrz&Cannot overwrite NamedTuple attribute )r)rrrr{rrrrrrrclassmethodrW_prohibitedr_specialr rr)rtypenamernsrr
default_names
field_namerr
class_getitemrs            rwrBzNamedTupleMeta.__new__
s	KD;&4w+>IKK	KOOO("-
	?JR$$Z0"?
|L>*-m*<q*@3b"I#'99]#;"<!>??		?x8E(F1A(F&(&68!e2M'2='AF$	.Ck!$%MPS%STTH$FNN)BRW-		.
e$$&
)Gs6EN)rrrrBrryrwr&r&
s ryr&c||j}n
|rtdt||t}tf|_|S)a?Typed version of namedtuple.

    Usage::

        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.)
    An alternative equivalent functional syntax is also accepted::

        Employee = NamedTuple('Employee', [('name', str), ('id', int)])
    zIEither list of fields or keywords can be provided to NamedTuple, not bothrq)rrrrmrHr)r0rrDnts    rwrHrH
sK(~	CD	D	x		:B#
B
IryrHctfSr)r)rs rw_namedtuple_mro_entriesr:
s
>ryc"eZdZddZeZdZeZy)rc
|D]'}t|tus|tustdt	d|Drtf}nd}tjt|g|t|}t|ds||_i}|jdi}	d}
|	jDcic]\}}|t||
|j }	}}t}
t}|D]}|j|jjdi|
j|jjdd|j|jjd	d|j|	|	jD]\}}t!|}|t"urt%|}|r|d
}t!|}|t&ur|
j)|P|t*ur|j)|j|r|
j)|~|j)|||_t/|
|_t/||_t|ds||_|Scc}}w)a7Create a 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 classc3<K|]}t|tywr)rrrs  rwrz)_TypedDictMeta.__new__.<locals>.<genexpr>
s5!z!W%5r*rrrUz?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typer6__required_keys____optional_keys__r	__total__)rsrrrrrBrrrr{rrrrupdaterxrXrrWrer^rbrUr9r>r?r@)rrXrr1totalrgeneric_basetp_dictr`own_annotationsrrr
required_keys
optional_keysannotation_keyannotation_typeannotation_originannotation_argss                   rwrBz_TypedDictMeta.__new__
sU	BDDz/D4G!ABB	B
5u55#:LL,,~t5J|5JT5JBOw 01%*G"&&!2B7O)..0
2
{2s7+=+=>>



	MDt}}001BBGH  !2!23F!KL  !2!23F!KL	M
	?+/>/D/D/F	2+NO *? ; I-"*?";"&5a&8O(2?(C% H,!!.1"k1!!.1!!.1!!.1	2"#.$-m$<!$-m$<!w, %GG
s*#Ictd)Nz4TypedDict does not support instance and class checksr)rr%s  rwr1z _TypedDictMeta.__subclasscheck__3sNOOryN)T)rrrrBrr!r1r-rryrwrr
s=~HP*ryrrBc||}n
|rtd|rtjdtddt	|i}t}|||d<t
|d||}tf|_|S)	aA simple typed namespace. At runtime it is equivalent to a plain dict.

    TypedDict creates a dictionary type such that a type checker will expect all
    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.

    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 an additional equivalent form::

        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::

        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 Required and NotRequired special forms can also be used to mark
    individual keys as being required or not required::

        class Point2D(TypedDict):
            x: int               # the "x" key must always be present (Required is the default)
            y: NotRequired[int]  # the "y" key can be omitted

    See PEP 655 for more details on Required and NotRequired.
    z@TypedDict takes either a dict or keyword arguments, but not bothzThe kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers.r
stacklevelrUrrrM)	rr"warnDeprecationWarningrrmrrIr)r0rrBrDr1rqtds       rwrIrI:s^~	()	)



7
	
T&\	*B
YF
!<	"b	6B"B
IryrIctfSr)
_TypedDictr9s rw<lambda>rVs:-rycNt||jd}t||fS)aSpecial typing construct to mark a TypedDict key as required.

    This is mainly useful for total=False TypedDicts.

    For example::

        class Movie(TypedDict, total=False):
            title: Required[str]
            year: int

        m = Movie(
            title='The Matrix',  # typechecker error if key is omitted
            year=1999,
        )

    There is no runtime checking that a required key is actually provided
    when instantiating a related TypedDict.
     accepts only a single type.rrr}rNs   rwreres+(zdjj\1M#NODw''rycNt||jd}t||fS)a7Special typing construct to mark a TypedDict key as potentially missing.

    For example::

        class Movie(TypedDict):
            title: str
            year: NotRequired[int]

        m = Movie(
            title='The Matrix',  # typechecker error if key is omitted
            year=1999,
        )
    rXrYrNs   rwrbrbs+zdjj\1M#NODw''ryc8eZdZdZeZdZdZdZdZ	dZ
dZy)	r^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 callable 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||_d|vr|jdd}||_||_t	}|dk7r||_yy)Nr|rtyping)r
rpartitionr
__supertype__rmr)r
rXrdef_mods    rwrzNewType.__init__sN $;??3'+D
)h%DOryc:|jGfdd}|fS)NceZdZfdZy)&NewType.__mro_entries__.<locals>.Dummyc	F|j}td|d|dd)NzGCannot subclass an instance of NewType. Perhaps you were looking for: `z = NewType(rz)`)rr)r
subclass_namesuperclass_names  rwrz8NewType.__mro_entries__.<locals>.Dummy.__init_subclass__s: #
%k-1B"_DUUWYryN)rrrr)rfsrwDummyrcs
ryrgr)r
rrgrfs   @rwrzNewType.__mro_entries__s!--		xryc8|jd|jS)Nr|)rrrs rwrzNewType.__repr__s//"!D$5$5#677ryc|jSr)rrs rwrzNewType.__reduce__s   ryct||fSrr#r$s  rwr&zNewType.__or__r'ryct||fSrr#r$s  rwr)zNewType.__ror__r*ryN)rrrrr
r!rrrrr&r)rryrwr^r^s,*H&
8!""ryr^ceZdZdZdZeedefdZeedefdZ	ed!dZ
eedefdZede
fd	Zed!d
ZedefdZed"de
defd
ZedefdZed"de
defdZed"de
deefdZed#de
de
de
fdZedefdZede
fdZed$de
de
fdZedefdZedede
fdZedeeddfdZed%dZed!d Zy)&rLaGeneric 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.
    rrcyrrrs rwmodezIO.mode	
rycyrrrs rwrXzIO.name
roryNcyrrrs rwclosezIO.closerrycyrrrs rwclosedz	IO.closedrorycyrrrs rwfilenoz	IO.filenorrycyrrrs rwflushzIO.flushrrycyrrrs rwisattyz	IO.isatty rryrcyrr)r
rs  rwreadzIO.read$rrycyrrrs rwreadablezIO.readable(rrylimitcyrr)r
rs  rwreadlinezIO.readline,rryhintcyrr)r
rs  rw	readlineszIO.readlines0rryoffsetwhencecyrr)r
rrs   rwseekzIO.seek4rrycyrrrs rwseekablezIO.seekable8rrycyrrrs rwtellzIO.tell<rrysizecyrr)r
rs  rwtruncatezIO.truncate@rrycyrrrs rwwritablezIO.writableDrryr+cyrrr
r+s  rwwritezIO.writeHrrylinescyrr)r
rs  rw
writelinesz
IO.writelinesLrrycyrrrs rw	__enter__zIO.__enter__Prrycyrr)r
rsr	tracebacks    rw__exit__zIO.__exit__Trry)rN)rrr)rz
IO[AnyStr]) rrrrrrNrrurnrXrrboolrtrrvrxrzrPr|r~rrDrrrrrrrrrrrryrwrLrLsd
I

c


c















c
6


$


c
6


c
4<


3

C


$


c


S
C


$


v
#


V






ryrLcJeZdZdZdZedeeefde	fdZ
eddZy)	rKz5Typed version of the return of open() in binary mode.rr+rcyrrrs  rwrzBinaryIO.write^rrycyrrrs rwrzBinaryIO.__enter__brryN)rrK)rrrrrrrr	bytearrayrrrrryrwrKrKYsH?I
uUI-.
3



ryrKceZdZdZdZeedefdZeede	fdZ
eedee	fdZeede
fdZeedefdZedd	Zy
)rOz3Typed version of the return of open() in text mode.rrcyrrrs rwbufferz
TextIO.bufferlrorycyrrrs rwencodingzTextIO.encodingqrorycyrrrs rwerrorsz
TextIO.errorsvrorycyrrrs rwline_bufferingzTextIO.line_buffering{rorycyrrrs rwnewlineszTextIO.newlinesrorycyrrrs rwrzTextIO.__enter__rryN)rrO)rrrrrrNrrKrrurrrrrrrrrryrwrOrOgs=I




#









#



ryrOceZdZfdZxZS)_DeprecatedTypec|dvrD||jvr6tj|jd|jdtdt
||S)N)rxrz5 is deprecated, import directly from typing instead. z  will be removed in Python 3.12.rrO)rxr"rQrrRr;__getattribute__)rrXr<s  rwrz _DeprecatedType.__getattribute__s^11dcll6JMM<<.!((+~6""#
w'--ry)rrrrr>r?s@rwrrs
	.	.ryrc$eZdZdZgdZeZeZeZy)ioz)Wrapper namespace for IO generic classes.)rLrOrKN)rrrr__all__rLrOrKrryrwrrs3*G	B
FHryrz.ioc eZdZdZddgZeZeZy)rez&Wrapper namespace for re type aliases.rNrMN)rrrrrrNrMrryrwrrs0'"GGEryrz.rec dx}fd|d|fdcS)rrrchtdt|jtj|S)aReveal the inferred type of a variable.

    When a static type checker encounters a call to ``reveal_type()``,
    it will emit the inferred type of the argument::

        x: int = 1
        reveal_type(x)

    Running a static type checker (e.g., mypy) on this example
    will produce output similar to 'Revealed type is "builtins.int"'.

    At runtime, the function prints the runtime type of the
    argument and returns it unchanged.
    zRuntime type is )file)printrsrrystderrrs rwrfrfs*
T#Y//2
3#**EJryr)	.defaultsrs  rw#<generic parameters of reveal_type>rsryc*eZdZWfdZZy)_IdentityCallablec"dx}fd|d|fdcS)rrvrcyrrrs  rwr!z_IdentityCallable.__call__sryr)rr
__classdict__s  rwz <generic parameters of __call__>z2_IdentityCallable.<generic parameters of __call__>sqryN)rrrr!__classdictcell__)rs@rwrrs
ryr)
eq_default
order_defaultkw_only_defaultfrozen_defaultfield_specifiersrrrrr.rDc&fd}|S)asDecorator to mark an object as providing dataclass-like behaviour.

    The decorator can be applied to a function, class, or metaclass.

    Example usage with a decorator function::

        @dataclass_transform()
        def create_model[T](cls: type[T]) -> type[T]:
            ...
            return cls

        @create_model
        class CustomerModel:
            id: int
            name: str

    On a base class::

        @dataclass_transform()
        class ModelBase: ...

        class CustomerModel(ModelBase):
            id: int
            name: str

    On a metaclass::

        @dataclass_transform()
        class ModelMeta(type): ...

        class ModelBase(metaclass=ModelMeta): ...

        class CustomerModel(ModelBase):
            id: int
            name: str

    The ``CustomerModel`` classes defined above will
    be treated by type checkers similarly to classes created with
    ``@dataclasses.dataclass``.
    For example, type checkers will assume these classes have
    ``__init__`` methods that accept ``id`` and ``name``.

    The arguments to this decorator can be used to customize this behavior:
    - ``eq_default`` indicates whether the ``eq`` parameter is assumed to be
        ``True`` or ``False`` if it is omitted by the caller.
    - ``order_default`` indicates whether the ``order`` parameter is
        assumed to be True or False if it is omitted by the caller.
    - ``kw_only_default`` indicates whether the ``kw_only`` parameter is
        assumed to be True or False if it is omitted by the caller.
    - ``frozen_default`` indicates whether the ``frozen`` parameter is
        assumed to be True or False if it is omitted by the caller.
    - ``field_specifiers`` specifies a static list of supported classes
        or functions that describe fields, similar to ``dataclasses.field()``.
    - Arbitrary other keyword arguments are accepted in order to allow for
        possible future extensions.

    At runtime, this decorator records its arguments in the
    ``__dataclass_transform__`` attribute on the decorated object.
    It has no other runtime effect.

    See PEP 681 for more details.
    c$d|_|S)N)rrrrrrD)__dataclass_transform__)	cls_or_fnrrrrrDrs rwrz&dataclass_transform.<locals>.decorator
s'$*., 0
-
	)ryr)rrrrrrDrs`````` rwrUrUsN		ry_Funcc tdtfSr)rrrryrwrr
sXc3h
ryc$ddx}fd|d|fdcS)FctSr)rrryrwrr!
sXrymethodrcB	d|_|S#ttf$rY|SwxYw)aIndicate that a method is intended to override a method in a base class.

    Usage::

        class Base:
            def method(self) -> None: ...
                pass

        class Child(Base):
            @override
            def method(self) -> None:
                super().method()

    When this decorator is applied to a method, the type checker will
    validate that it overrides a method or attribute with the same name on a
    base class.  This helps prevent bugs that may occur when a base class is
    changed without an equivalent change to a child class.

    There is no runtime checking of this property. The decorator attempts to
    set the ``__override__`` attribute to ``True`` on the decorated object to
    allow runtime introspection.

    See PEP 698 for details.
    T)__override__rr)rs rwrdrd!
s62
"M
I&
	
M
rr)rrs  rw <generic parameters of override>r!
sX q  ryrr)rV__main__)r)NNF)r)rrrrrrcollections.abccopyregrsrrr	stdlib_reryrr"rrrr	_typingr
rrr
rrrrrrxrrrrrrrrrrrrrr9rrrrr6rsr9rrar]rhr\rrrr]rrrkrrlrrrrrrrrrrrrrr}rrr%r)r1rrbrrrmrGr_TYPING_INTERNALS_SPECIAL_NAMESr]rarcrmrorrrxrrr{pickler~rr-rrrrrgrSrQrBuiltinFunctionTyperrrrZrrXrWr[rrRr_r`rpartialrrrcrYrTrVrrrrrrrrrrurP_aliasr#r0r3r2r1r%r&r7r.r!r4rrFrr,r(r*r-r+r rrrrDdequerArrGr)r'r$r/rqr"rrr6rBrCrEr@r?rJr5rr=r;r:r9r<r8r>rr.r/r&rHrBr)r:rrrIrUrerbr^rirjrLrKrOrrrrzrNrMrfrrUrrdrryrw<module>rs*(#
^^			ol5PUB@
(2<
<
' 
	
U<6?[
DFF((/6<t(/V0,d0	"t	"5H5$44(44044&444((*((*)0)0V""

22B
4
4 662.(.(bQDtQDhFFF
OOO"J-&-&`#&L9@Td@T\V%TVz)!<):$)!X/2$/2L-t2"&(&B&%T&#}D#D.D=D)}D)/:/:d:-t:833(.8<U;VV"(:	8,-JK
*667/}n-3 01$VGVr

.24w-24j1"lM1"hF
F
R4
 $$e&?&?""E$4$4'):<PR
`]F
2:2*!$OeO5O2!H:!!2!2!2;!EF&R	3
!
NCLT]T]v&v&4(:T24t4

5#	&
+//**A.;??,,a0	;??,,a0	{44a8
{44a8
+//**A.+//**A.
KOO..
2
{$$a(;??,,a0	
KOO..
2
1115	[__((!-@
KOO..
2

((!
,66:+//**A.88!<
$OO7
	5"5w7	
dAE/{  !'2S!%e,9ae+>	[__00!4+//**A.;??,,a0	
KOO..
2

991CSTZCCQMbc
dAE/[,,amD[,,a0
$$a
(+&&*;??,,a0	66:
dAE/2
(


H


h


H


H





DEBC!T!H:ll><R@5
F*TF*REEN\\.+r2
>
7	((.(($;";"~
`
`
F
r%y
 
RW 
F
.d
.?BKK
""A
&y"?BKK&! CE
QQQ	Q
QDIc(::C?@
QQQh   ry