Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/__pycache__/typing_extensions.cpython-311.pyc



]jddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZ
ddlZddlZejdkrddlZgdZdZeZejdkZdejjvZdd	ZeZeed
rejZn
Gdd
ZeZed
Z ejdkrd
Z!ndZ!ej"Z"ej#dZ$ej#dZ%ej#dZ&ej#ddZ'ej#ddZ(ejdkrddlm)Z)nGddeZ*Gdde*Z)ej+Z+Gddej,dZ-Gd d!ej-dZ.ej/Z/ejdkrej0Z0nd"Z0eed#rej1Z1nd$Z1d%Z2ejd&krej3Z3n7d'Z4d(Z5Gd)d*ej6dZ7Gd+d,e.dZ8e8d-.Z3ej9Z9eed/rej:Z:ej;Z;ej<Z<n-ej=ej>ej=e?Z@d0Z:d1Z;d2Z<ejAZAejBZBejCZCejDZDejEZEejFZFejGZGejHZHejIZIejJZJejKZKejLZLejdkr
dd3lmMZMmNZNmOZOmPZPnd4ZQGd5d6ejRdZRedZSeRejjPd7eSeSf8ZPeRejjNd9eSf8ZNeRejTd9d:ejUeVf;ZOeRejWd9d<ejUeVf;ZMgd=d>d?gd@dAgdBgdCgdDZXeYejZhdEzZ[dFZ\ejdkrej]Z]nGddGZ^dHZ_dIZ`GdJdKeej]ZaebdLZcGdMdNejdeaZ]ejdOkrejeZendPZeeeZfejdQkr2ejgZgejhZhejiZiejjZjejkZkejlZlejmZmneeGdRdSe]ZgeeGdTdUe]ZheeGdVdWe]ZieeGdXdYe]ZjeeGdZd[e]ZkeeGd\d]e]e'ZleeGd^d_e]e'Zmeed@reedArejnZnejoZon8eeGd`d@e]e'ZneeGdadAe]e(ZoeedbpeedcZpeprGdddeeZqeedbrejrZrnGdfdgeqZsesZr[seedcrejtZtnGdhdieqZueuZt[uepr[qdjZvevrejwZwejxZxejyZynodkejzej{j|vZ}dlZ~GdmdneZxeexdodpiZdqZGdrdse-dZedtZwejxexfZduZyeedvrejZndwZeedxrejZndyZddzZedZSd{Zdd|ZejdkrejZejZnd}Zd~ZeedrejZne.dZdZdZGddZGddeZerddlm#Z#nGddeZ#eedrejZejZn)GddZGddeZGddeZerddlmZn+eedrGddeZnGddeeZeeds+eeds	ddjddZnejZGddeZn'ejZejdkrGddejdZGddZdZejdZejdkrejZne.dZeedrejZne.dZeedrejZne.dZeedrejZnGdde.dZedZeedrejZne-dZeedrejZne-dZeedrejZne-dZeedrejZejZne.dZe.dZeedxrejZne.dZdZejdQkrejZdZn3Gdde.dZGddej6dZedZdZdZejdkrddlmZn*eedrGddeZnGddeZeedrejZnde$de$fdÄZeedĦrejZndZeedƦrejZndedefdȄZejdQkrejZnhddjdjdjdpdɜdeVdeVdeVdeVdejejejAej)ejdej)ffdfdej)deje$ge$ffdфZeedҦrejZn,ej#dejdej)fԦZdedefdՄZdejcxkrdks
nejdkrejZnej#dئZGdلdڦZejdkrdۄZnd܄Zeedse fd݄ZndބZesee_deVfd߄ZeeeddhZdeVfdZeedr
ddZee_ndZesee_ejdOkrejZnNddZejZeYhdZGddeZeeddpiZdZe fdZee_eejdBr
ejjZnRGddBejZeɠe̦eɠeͦeɠeΦee
dre
jZndZejdkrejZn
GddZejdkrejZnLejdQkrdZndZejdkr"eYhdZGddej6dZGddZeedrejZejZndedeVfdZdedejefdZeedrejZn
GddZee
ddZeڀ+	ddlZeeddZe܁eeܦZn#e$rYnwxYweځeZedejdkr	ddlmZmZn%GddejZdddjejddZeedrejZn ddddddZdddddeYddZejd	krejZnd
ZgdZejdkr,ed
ed
edeDejdZdejZejZdS(N)wAnyClassVarConcatenateFinal
LiteralString	ParamSpec
ParamSpecArgsParamSpecKwargsSelfTypeTypeVarTypeVarTupleUnpack	Awaitable
AsyncIterator
AsyncIterable	CoroutineAsyncGeneratorAsyncContextManagerBufferChainMapContextManagerCounterDequeDefaultDict
NamedTupleOrderedDict	TypedDictSupportsAbs
SupportsBytesSupportsComplex
SupportsFloat
SupportsIndexSupportsInt
SupportsRoundReaderWriter	Annotatedassert_neverassert_typeclear_overloadsdataclass_transform
deprecated
disjoint_baseDocevaluate_forward_ref
get_overloadsfinalFormatget_annotationsget_args
get_originget_original_basesget_protocol_membersget_type_hintsIntVaris_protocolis_typeddictLiteralNewTypeoverloadoverrideProtocolsentinelSentinelreveal_typeruntimeruntime_checkableText	TypeAlias
TypeAliasTypeTypeForm	TypeGuardTypeIs
TYPE_CHECKING	type_reprNeverNoReturnReadOnlyRequiredNotRequired	NoDefaultNoExtraItemsAbstractSetAnyStrBinaryIOCallable
Collection	ContainerDict
ForwardRef	FrozenSet	GeneratorGenericHashableIO	ItemsViewIterableIteratorKeysViewListMappingMappingViewMatchMutableMappingMutableSequence
MutableSetOptionalPattern
ReversibleSequenceSetSizedTextIOTupleUnion
ValuesViewcast
no_type_checkT)r
rbeta__forward_is_class____main__c	tj|dzp|S#t$rYnwxYw	tj|dzjd|S#ttf$rYnwxYwdS)Nr__name__)sys_getframemodulenameAttributeError	_getframe	f_globalsget
ValueError)depthdefaults  q/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/typing_extensions.py_callerrs
&uqy11<W<




}UQY''155j'JJJJ'



4s
((/AA0/A0rEc,eZdZdZeefdeddedejedejededdf
d	Zfd
Z	dede
ddffd
ZedefdZej
deddfdZdefdZejdkrdZejdkrdZdZdefdZxZS)rEzCreate a unique sentinel object.

        *name* should be the name of the variable to which the return value
        shall be assigned.
        N)reprname_sentinel__name_sentinel__reprrrreturnc|turtjdtd|}|turt	d|turtjdtd|}||_||n||_t|_dS)NzQPassing 'name' as a keyword argument is deprecated; pass it positionally instead.
stacklevelz"First parameter 'name' is requiredzRPassing 'repr' as a positional argument is deprecated; pass it by keyword instead.)	_sentinel_placeholderwarningswarnDeprecationWarning	TypeError_name_reprr
__module__)selfrrrrs     r__init__zsentinel.__init__s000
4& 	... DEEE222
2& 	DJ!%!1vDJ&iiDOOOctjdtdtdS)NzHSubclassing sentinel is deprecated and will be disallowed in Python 3.15rr)rrrsuper__init_subclass__)cls	__class__s rrzsentinel.__init_subclass__sEM8"	




GG%%'''''rattrvaluec|dvr tjd|dtdt||dS)N>rrrzSetting attribute zI on sentinel objects is deprecated and will be disallowed in Python 3.15.rr)rrrr__setattr__)rrrrs   rrzsentinel.__setattr__sf;;;
====& 	
GGe,,,,,rc|jSNrrs rrzsentinel.__name__s
:rc||_dSrr)rrs  rrzsentinel.__name__s
DJJJrc|jSr)rrs r__repr__zsentinel.__repr__s
:rrcJtt|jd)Nz object is not callable)rtyperrargskwargss   r__call__zsentinel.__call__s"4::#6 Q Q QRRRrr
c*tj||fSrtypingryrothers  r__or__zsentinel.__or__|D%K00rc*tj||fSrrrs  r__ror__zsentinel.__ror__|E4K00rc|jS)z$Reduce this sentinel to a singleton.rrs r
__reduce__zsentinel.__reduce__s
= r)rr__qualname____doc__rstrrrqrrobjectrpropertysetterrrversion_inforrrr
__classcell__rs@rrErEs		0+@ 	(*.- 	( 	( 	( 	(OC( 	(/#&
 	( 	( 	( 	( 	( 	(D	(	(	(	(	(	-C	-	-4	-	-	-	-	-	-
	c			
	
	#	$			
		c				g%%
S
S
Sw&&
1
1
1
1
1
1	!	!	!	!	!	!	!	!	!rrcdt|tjtjtjfSr)
isinstancer
_GenericAlias_typesGenericAlias	UnionTypets r_should_collect_from_parametersrs)
$f&96;KL

	
rcNt|tjtjfSr)rrrrrrs rrrs!f2F4GHIIIrTKTVTT_co)	covariantT_contra)
contravariantr)rc(eZdZfdZfdZxZS)_AnyMetacv|turtdt|S)Nz6typing_extensions.Any cannot be used with isinstance())rrr__instancecheck__)robjrs  rrz_AnyMeta.__instancecheck__3s3s{{ XYYY77,,S111rcZ|turdStS)Nztyping_extensions.Any)rrr)rrs rrz_AnyMeta.__repr__8s(s{{..77##%%%r)rrrrrrrs@rrr2sQ	2	2	2	2	2
	&	&	&	&	&	&	&	&	&rrc"eZdZdZfdZxZS)raqSpecial 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.
        cn|turtdtj|g|Ri|S)NzAny cannot be instantiated)rrr__new__rrrrs   rrzAny.__new__FsAczz <==="577?38888888r)rrrrrrrs@rrr=sB			9	9	9	9	9	9	9	9	9rr)	metaclasscneZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
ejdZd
S)_SpecialForm)rr_getitemcD||_|j|_|j|_dSr)rrrr)rgetitems  rrz_SpecialForm.__init__Ts 
%
rc6|dvr|jSt|)N>rr)rr)ritems  r__getattr__z_SpecialForm.__getattr__Ys$///:T"""rc&td|)NzCannot subclass rrbasess  r__mro_entries__z_SpecialForm.__mro_entries___s3433444rcd|jSNztyping_extensions.rrs rrz_SpecialForm.__repr__bs0DJ000rc|jSrrrs rrz_SpecialForm.__reduce__es
zrc&td|)NzCannot instantiate rrrkwdss   rrz_SpecialForm.__call__hs6d66777rc*tj||fSrrrs  rrz_SpecialForm.__or__ks|D%K((rc*tj||fSrrrs  rrz_SpecialForm.__ror__ns|E4K((rc&t|d)Nz! cannot be used with isinstance()rrrs  rrz_SpecialForm.__instancecheck__q4BBBCCCrc&t|d)Nz! cannot be used with issubclass()r)rrs  r__subclasscheck__z_SpecialForm.__subclasscheck__trrc.|||Sr)rr
parameterss  r__getitem__z_SpecialForm.__getitem__ws}}T:...rN)rrr	__slots__rrrrrrrrrr	r	_tp_cacher
rrrrQs0I'''
###555111888))))))DDDDDD/////rr)_rootceZdZdZdS)_ExtensionsSpecialFormcd|jzSrrrs rrz_ExtensionsSpecialForm.__repr__s#dj00rN)rrrrrrrrrs#11111rrcF	d|_n#ttf$rYnwxYw|S)aThis decorator can be used 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
        sets the ``__final__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.
        T)	__final__rr)fs rr5r5s>,	AKK	*			
D		

r1cd|_|S)a<This decorator marks a class as a disjoint base.

        Child classes of a disjoint base cannot inherit from other disjoint bases that are
        not parent classes of the disjoint base.

        For example:

            @disjoint_base
            class Disjoint1: pass

            @disjoint_base
            class Disjoint2: pass

            class Disjoint3(Disjoint1, Disjoint2): pass  # Type checker error

        Type checkers can use knowledge of disjoint bases to detect unreachable code
        and determine when two types can overlap.

        See PEP 800.T)__disjoint_base__rs rr1r1s(!%
rc*tj|Sr)rr)rs rr=r=s>$r)rrrcg}|D]G}t|tr||j2||Ht|S)zJAn internal helper for Literal creation: flatten Literals among parameters)r_LiteralGenericAliasextend__args__appendtuple)rparamsps   r_flatten_literal_paramsr%sa	!	!A!122
!

aj))))

a    V}}rc#:K|D]}|t|fVdSr)r)r#r$s  r_value_and_type_iterr's8		AT!WW*		rceZdZdZdZdS)rct|tstStt	|j}tt	|j}||kSr)rrNotImplementedsetr'r )rrthese_args_dedupedother_args_dedupeds    r__eq__z_LiteralGenericAlias.__eq__sYe%9::
&%%!$%9$-%H%H!I!I!$%9%.%I%I!J!J%);;;rc^ttt|jSr)hash	frozensetr'r rs r__hash__z_LiteralGenericAlias.__hash__s#	"6t}"E"EFFGGGrN)rrrr.r2rrrrrs7	<	<	<	H	H	H	H	Hrrc eZdZdefdZdZdS)_LiteralFormdocc0d|_|x|_|_dS)Nr@)r_docr)rr5s  rrz_LiteralForm.__init__s"DJ'**DIrct|ts|f}t|}tt	|}	t|}t
|t
|krVg}|D]6}||vr0||d||7|r
J|t|}n#t$rYnwxYwt||S)Nr)rr"r%listr'r+lenr!removerr)rrval_type_pairs
deduped_pairsnew_parameterspairs      rr
z_LiteralForm.__getitem__sj%00
+(]
0<<J!"6z"B"BCCN
7 #N 3 3
}%%N(;(;;;%'N .77=00*11$q':::)00666,;;m;;,!&~!6!6J



(j999sC
CCN)rrrrrr
rrrr4r4s>	+	+	+	+	+	:	:	:	:	:rr4a                           A type that can be used to indicate to type checkers
                           that the corresponding value has a value literally equivalent
                           to the provided parameter. For example:

                               var: Literal[4] = 4

                           The type checker understands that 'var' is literally equal to
                           the value 4 and no other value.

                           Literal[...] cannot be subclassed. There is no runtime
                           checking verifying that the parameter is actually a value
                           instead of a type.)r5r4ct|d|}	|t|j|j|jj<n#t$rYnwxYwtS)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.  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

        The overloads for a function can be retrieved at runtime using the
        get_overloads() function.
        __func__)getattr_overload_registryrr__code__co_firstlinenor_overload_dummy)funcrs  rrBrB$sn<
D*d++	
q|,Q^<
)

			D	s*>
A
Act|d|}|jtvrgSt|j}|j|vrgSt	||jS)z6Return all defined overloads for *func* as a sequence.rA)rBrrCrr9values)rGrmod_dicts   rr4r4Lsg
D*d++<111I%al3>))IHQ^,3355666rc8tdS)z$Clear all overloads in the registry.N)rCclearrrrr.r.Ws  """""r)rrrrbcV|do|dS)N__)
startswithendswith)rs r
_is_dunderrQrs%t$$<t)<)<<rcLeZdZdddfd
ZdZejdZxZS)_SpecialGenericAliasTNinstrc|dks
Jd|s
Jdt||||||_dS)Nrz$`nparams` must be a positive integerz7Must always specify a non-empty sequence for `defaults`rT)rr	_defaults)roriginnparamsdefaultsrUrrs      rrz_SpecialGenericAlias.__init__wsWQ;;; F;;;VVVVV8GGVW4dCCC%DNNNrchd}t|s||vrt|||dSt|j||dS)N>_instr_nparamsrW)rQrrsetattr
__origin__)rrval
allowed_attrss    rrz _SpecialGenericAlias.__setattr__}s_GGGM$
44=#8#8""4s33333s33333rc
6t|ts|f}dtfd|D}t||jkrVt|t|jz|jkr)g||jt||jz
dR}t|}||jkrGd|jt|jz
}td||jkrdndd|d|d	|||S)
Nz*Parameters to generic types must be types.c3BK|]}tj|VdSrr_type_check.0r$msgs  r	<genexpr>z3_SpecialGenericAlias.__getitem__.<locals>.<genexpr>s0FF!6-a55FFFFFFr	at least Too manyfew arguments for 	; actual , expected )rr"r:r]rWr	copy_with)rr#
actual_lenexpectedrhs    @rr
z _SpecialGenericAlias.__getitem__sQfe,,
# >CFFFFvFFFFFFFdm++KK#dn"5"55FFQ6QDN3v;;3N3O3O$PQQVJT]**Lt}s4>7J7J'JLLAZ$-%?%?66UAA&*AA)AA6>AA
>>&)))r)	rrrrrrrr
rrs@rrSrSvsu>B	&	&	&	&	&	&	&	4	4	4
		*	*
		*	*	*	*	*rrSr)rZrr)rrZr)r\rrgrhrrrdrvr^r]rsrAbstractContextManagerAbstractAsyncContextManagerr)r*rPathLike)zcollections.abc
contextlibiotyping_extensionsos>r__match_args____protocol_attrs____non_callable_proto_members__ct}|jddD]_}|jdvrt|di}g|j|RD]5}|ds|tvr||6`|S)N>rcrD__annotations___abc_)r+__mro__rrB__dict__rO_EXCLUDED_ATTRSadd)rattrsbaseannotationsrs     r_get_protocol_attrsrsEEECRC   =333d$5r::2dm2k22	 	 DOOG,,
 _1L1L		$	 Lrc$t|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.
        >Nabc	functools)rrs r_allow_reckless_class_checksrs
u~~!;;;rcLt|jrtddS)Nz Protocols cannot be instantiated)r_is_protocolrrs   r_no_initrs/::"	@>???	@	@rcNt|tstddS)aRaise TypeError if `arg` is not an instance of `type`
        in `issubclass(arg, <protocol>)`.

        In most cases, this is verified by type.__subclasscheck__.
        Checking it again unnecessarily would slow down issubclass() checks,
        so, we don't perform this check unless we absolutely have to.

        For various error paths, however,
        we want to ensure that *this* error message is shown to the user
        where relevant, rather than a typing.py-specific error message.
        z"issubclass() arg 1 must be a classN)rrrargs r_type_check_issubclass_arg_1rs2#t$$	B@AAA	B	Brc8eZdZdZdZdZdZdZdefdZ	dS)	
_ProtocolMetac|dkrt|dkrnttjht|zrs|D]p}|ttjttjhvsH|jt|j	gvs!t|std|qtj
j||||fi|S)NrDrz5Protocols can only inherit from other protocols, got )r:rDrr+rrcr_PROTO_ALLOWLISTrrr>rrABCMetar)mclsrr	namespacerrs      rrz_ProtocolMeta.__new__sz!!c%jj1nnFO,s5zz9

!		D6? SSS=,<,@,@RT,U,UUU&t,,V(,#',,;&tT5)NNvNNNrctjj|g|Ri|t|ddrt	||_dSdS)NrF)rrrrBrr|rrrs   rrz_ProtocolMeta.__init__s\K 6t666v666sNE22
B)<S)A)A&&&
B
Brc|turt||St|ddrt	st|ddst|t
d|jrl|j	dturKt|t|j}t
dt|ddd	tj||S)
NrF_is_runtime_protocolLInstance and class checks can only be used with @runtime_checkable protocols__subclasshook__zRProtocols with non-method members don't support issubclass(). Non-method members: rr.)rDrr	rBrrrr}rr_proto_hooksortedrrr)rrnon_method_attrss   rr	z_ProtocolMeta.__subclasscheck__s"h--c5999^U33
466
s$:EBB0777#76
(();<<KK0777'-c.P'Q'Q$#O034D0E0Ead0KOOO;00e<<<rc|turt||St|dds tj||St|ddst
stdtj||rdS|jD]7}	tj
||}n#t$rYnwxYw|||jvrn8dSdS)NrFrrT)
rDrrrBrrrrr|inspectgetattr_staticrr})rinstancerr`s    rrz_ProtocolMeta.__instancecheck__*s&h--c8<<<366
D{44S(CCCC!7??
A022
A !@AAA{,,S(;;
t.	
	
!04@@CC%EE;4s/Q#Q#QEt5s0C
CCcxtj||durdS|tuo
|tjuS)NT)rrr.rDrrrs  rr.z_ProtocolMeta.__eq__Js<{!!#u--55t(??u'??rrc6t|Sr)rr2rs rr2z_ProtocolMeta.__hash__Us==%%%rN)
rrrrrr	rr.intr2rrrrrs	O	O	O 	B	B	B
	=	=	=4			@	@	@	@	&S	&	&	&	&	&	&rrcT|jddstS|jD]}}|jD]j}||jvr|j|tccSnOt|di}t
|tjj	r||vrt|rn
ktcS~dS)NrFrT)rrr*r|rrBrcollectionsrrkr>)rrrrrs     rrrXs|66	"!!*	&	&D

&
&4=((}T*2------E&d,=rBB{KO,CDD++#E**,E%%%%trcBeZdZejjZdZdZdZfdZ	xZ
S)rDrTFc4tj|i||jdds#t	d|jD|_d|jvrt|_|jr!|j	tj	urt|_	dSdSdS)NrFc3(K|]
}|tuVdSr)rDrgbs  rriz-Protocol.__init_subclass__.<locals>.<genexpr>|s&&L&LqH}&L&L&L&L&L&Lrr)rrrrany	__bases__rrrrrDrrs   rrzProtocol.__init_subclass__ws%EGG%t6v666<##NE::
M#&&L&Lcm&L&L&L#L#L "55'2$
(CLH4E$E$E'
(
($E$Er)rrrrrDrrrrrrrs@rrDrDqsR/)	$
	(
	(
	(
	(
	(
	(
	(
	(
	(rrDrr}ct|tjrt|ddst	d|d|_t
|tstj	dkr~t|_|jD]c}	tt||d}|s|j|>#t$r}t	d|d|d}~wwxYw|S)	ajMark 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!
        rFz@@runtime_checkable can be only applied to protocol classes, got T)rrNz,Failed to determine whether protocol member z is a method member)
issubclassrrcrBrrrrrrr+r}r|callabler	Exception)rris_callablees    rrIrIs3&#v~..	-gc>SX6Y6Y	-,$',,--
-#' c=))	ES-=-K-K
25C..

E

E	E"*73d+C+C"D"DK'E:>>tDDD!#-t---
sC
C%C  C%rrc<eZdZdZdZejdefdZdS)r'z(An ABC with one abstract method __int__.rrcdSrrrs r__int__zSupportsInt.__int__DrN)	rrrrrrabstractmethodrrrrrr'r'sH66				S			
				rr'c<eZdZdZdZejdefdZdS)r%z*An ABC with one abstract method __float__.rrcdSrrrs r	__float__zSupportsFloat.__float__rrN)	rrrrrrrfloatrrrrr%r%H88				u			
				rr%c<eZdZdZdZejdefdZdS)r$z,An ABC with one abstract method __complex__.rrcdSrrrs r__complex__zSupportsComplex.__complex__rrN)	rrrrrrrcomplexrrrrr$r$sH::							
				rr$c<eZdZdZdZejdefdZdS)r#z*An ABC with one abstract method __bytes__.rrcdSrrrs r	__bytes__zSupportsBytes.__bytes__rrN)	rrrrrrrbytesrrrrr#r#rrr#c8eZdZdZejdefdZdS)r&rrcdSrrrs r	__index__zSupportsIndex.__index__rrN)rrrrrrrrrrrr&r&sB				s			
				rr&c<eZdZdZdZejdefdZdS)r"z_
        An ABC with one abstract method __abs__ that is covariant in its return type.
        rrcdSrrrs r__abs__zSupportsAbs.__abs__rrN)	rrrrrrrrrrrrr"r"sN						T			
				rr"cBeZdZdZdZejddedefdZ	dS)	r(za
        An ABC with one abstract method __round__ that is covariant in its return type.
        rrndigitsrcdSrr)rrs  r	__round__zSupportsRound.__round__rrNr)
rrrrrrrrrrrrrr(r(sZ							S				
				rr(cBeZdZdZdZejddedefdZ	dS)	r)zeProtocol for simple I/O reader instances.

        This protocol only supports blocking I/O.
        r.sizercdS)zRead data from the input stream and return it.

            If *size* is specified, at most *size* items (bytes/characters) will be
            read.
            Nr)rrs  rreadzReader.readrN).)
rrrrrrrrrrrrrr)r)sZ		
					S	d			
				rc@eZdZdZdZejdedefdZ	dS)r*zeProtocol for simple I/O writer instances.

        This protocol only supports blocking I/O.
        rdatarcdS)zIWrite *data* to the output stream and return the number of items written.Nr)rrs  rwritezWriter.write/rrN)
rrrrrrrrrrrrrr*r*&s]		
				\h	\c	\	\	\
		\	\	\rrWrXceZdZdZdS)
SingletonMetac6td|d|j)Nzcannot set z attribute of immutable type rr)rrrs   rrzSingletonMeta.__setattr__:s)SdSS3<SS
rN)rrrrrrrrr9s#					rrc(eZdZdZdZdZdZdZdS)
NoDefaultTypez$The type of the NoDefault singleton.rcxtdpt|SNrWglobalsrrrrs rrzNoDefaultType.__new__Is)99==--D1D1DDrcdS)Nztyping_extensions.NoDefaultrrs rrzNoDefaultType.__repr__Ls00rcdSrrrs rrzNoDefaultType.__reduce__Os;rNrrrrrrrrrrrrrDsO22		E	E	E	1	1	1					rrc(eZdZdZdZdZdZdZdS)NoExtraItemsTypez'The type of the NoExtraItems singleton.rcxtdpt|SNrXrrs rrzNoExtraItemsType.__new__]s)99==00GFNN34G4GGrcdS)Nztyping_extensions.NoExtraItemsrrs rrzNoExtraItemsType.__repr__`s33rcdSrrrs rrzNoExtraItemsType.__reduce__cs!>rNrrrrrrXsO55		H	H	H	4	4	4	"	"	"	"	"rrFmodulec#NK	t|}|turt|}|r	|d}npdS|turtVt|\}nJ|turtVt|\}n&|t
urt
Vt|\}ndS)NTr)r9r+r8rUrVrT)annotation_typeannotation_originannotation_argss   r_get_typeddict_qualifiersrs	 *? ; ; I--"*?";";"&5a&8OOE"h..#+O#<#< "k11!!!!#+O#<#< "h..#+O#<#< %	rc,eZdZddeddZeZdZeZdS)_TypedDictMetaTNtotalclosedextra_itemsc 
D]5}t|tur|tjurt	d6||t
urt	d|dt
dDrtjf}nd}|dd}	ttdg|tR||_
jdkr|_td	s_
i}
d|	|	nxtjd
krftt drt!j|n|d"t!jt(j
ninidt,r"fdDn fdDt1}t1}t1}
t1}|}D]}|j}tjd
kr)|
|di|dt1}||z}||z}|dt1}||z}||z}|
|dd||dd|rwtjd
krgdvrcd}t1t7|}t8|vrt	dt:|vrt	d|}|
D]\}}t1t7|}t8|vrd}nt:|vrd}n|}|r+||||n*||||t@|vr+|||
||||
|tjd
krfd}|_!n|
_"tG|_$tG|_%tG|
_&tG|_'|_(|_)|_*S)aICreate 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 classNzCannot combine closed=z and extra_itemsc3JK|]}t|tjVdSr)rrrcrs  rriz)_TypedDictMeta.__new__.<locals>.<genexpr>s.@@Q:a00@@@@@@rrrrD__orig_bases__r!get_annotate_from_class_namespace__annotate__ownerz?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typecPi|]"\}}|tj|j#Srrrerrgntprhtp_dicts   r
<dictcomp>z*_TypedDictMeta.__new__.<locals>.<dictcomp>sD+++2v)"c':LMMM+++rcBi|]\}}|tj|Srrd)rgrrrhs   rrz*_TypedDictMeta.__new__.<locals>.<dictcomp>s<+++2v)"c22+++r__required_keys____optional_keys____readonly_keys____mutable_keys____extra_items__z5Special key __extra_items__ does not support Requiredz8Special key __extra_items__ does not support NotRequiredTFci}D]B}|tur|j}|tj|||}||CItj|}|t
jkr!fd|D}nQ|t
jkrtj	}n,|t
j	t
j
fvr
}nt||||S)NrcPi|]"\}}|tj|j#Srrrs   rrz@_TypedDictMeta.__new__.<locals>.__annotate__.<locals>.<dictcomp>,sD###$)Ar!"6#5b#gFX#Y#Y#Y###r)rcr

annotationlibcall_annotate_functionupdater6STRINGitemsannotations_to_string
FORWARDREFVALUENotImplementedError)formatannosr
base_annotate
base_annosownrrhown_annotateown_annotationsown_checked_annotationsrs      rr
z,_TypedDictMeta.__new__.<locals>.__annotate__s3E %117??$(,(9
(0$%2%I)6&?&?&?
Z0000#/+B(&AAA!V]22#####-0YY[[###C 6=00+A/RRF$5v|#DDD51&999LL%%% Lr)+rrrrcrrXrpoprdictrrhasattrrrrrr	rrr6r$
_TAKES_MODULEr"r+rr rrUrVrdiscardrTr
rr1rrrr	__total__
__closed__r)rrrnsrrrrgeneric_basens_annotationsr
required_keys
optional_keys
readonly_keysmutable_keysextra_items_type	base_dict
base_required
base_optionalr
qualifiersannotation_keyis_requiredr
rhr,r-r.rs  `                     @@@@@rrz_TypedDictMeta.__new__s
F
F::^33FN8R8R#%EFFF!k&E&E S S S STTT@@%@@@@@
" &0!VV$5t<<Nll>:?T?Tt?T?TVXYYG#G#z11'+$7$455
/).&KL)"0!W,,=*MNN:#0#RSU#V#VLL$&66.#9#9L+&3&J$f&7w'''OO')OO"$SC	
+++++!0!6!6!8!8+++''
++++!0!6!6!8!8+++' EEMEEMEEM55L*
K
K M	#w..&&y}}5F'K'KLLL )

.A355 I I
.
.
 )

.A355 I I
.
.
$$Y]]3F%K%KLLL##IMM2Db$I$IJJJJ

33+g55,0GGG"9"="=>O"P"P !:?!K!KLL
z))##*,,#&$3 67773J3P3P3R3R
:
:/ !:?!K!KLL
z))"&KK J.."'KK"'K:!%%n555!)).9999!%%n555!)).999z)) ((888!%%n5555 $$^444!)).99997**!!!!!!!!!!8(4$$*5'(1-(@(@G%(1-(@(@G%(1-(@(@G%'0'>'>G$ %G!'G&6G#Nrc td)Nz4TypedDict does not support instance and class checksrrs  rr	z _TypedDictMeta.__subclasscheck__GsRSSSr)	rrrrXrr0rr	rrrrrrsX37 ,h	h	h	h	h	T	T	T	T.rrr!rc"|tus|g|turd}nd}d|d|d}|d|zdz}	tj|	td	|d
ur
|dur	|||d<d}|tur||d
<t}|}n|rtd|r;tjdkrtdtjdtd	dt|i}
t|rdnd}|||
d<t|d|
|||}tf|_|S)N2Failing to pass a value for the 'fields' parameter(Passing `None` as the 'fields' parameter`z
 = TypedDict(z, {})`z is deprecated and will be disallowed in Python 3.15. To create a TypedDict class with 0 fields using the functional syntax, pass an empty dictionary, e.g. rrrFTrrz@TypedDict takes either a dict or keyword arguments, but not bothrz$TypedDict takes no keyword argumentszThe 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.rrrrr)
_markerrrrrXrrrr0rrr!r)
typenamefieldstyping_is_inlinerrrrdeprecated_thingexampledeprecation_msgr6rtds
             r_create_typeddictrROsW  H! $N E(EEEEEG#OOO		O

M/+=!LLLLU""vT'9'9f>P#)x ,..(3}%*FF
	-,--
-
	7** FGGGM;#



 f
.$4;qq!<<< &B|
Hb"E&(3555&L	rc(eZdZefddeddZdZdS)_TypedDictSpecialFormTNrc(t||fd|||d|S)NFrMrrr)rR)rrKrLrrrrs       rrz_TypedDictSpecialForm.__call__s>%"''

rctfSr)
_TypedDictrs  rrz%_TypedDictSpecialForm.__mro_entries__s
= r)rrrrJrXrrrrrrTrTsQ	$					*	!	!	!	!	!rrTc~t|tstdtd|dddtS)aqA 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.
        z9TypedDict[...] should be used with a single dict argumentz<inline TypedDict>TrV)rr0rrRrXrrs  rr!r!sWb$%%	K
! !$



	
rc,t|tS)aCheck 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
        )r_TYPEDDICT_TYPESrs rr?r?s".///rr-c|S)aAssert (to the type checker) that the value is of the given type.

        When the 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

        At runtime this returns the first argument unchanged and otherwise
        does nothing.
        r)r`typs  rr-r-s	
rrTczt|tjrt|jSt|dr5|jtttfvrt|j	dSt|tj
r@td|j	D}||j	kr|S||Sttdr_t|tjrEtd|j	D}||j	kr|Stj|j|Sttdrdt|tjrJtd|j	D}||j	kr|St!jt$j|S|S)z=Strips Annotated, Required and NotRequired from a given type.r_rc34K|]}t|VdSr
_strip_extrasrgas  rriz _strip_extras.<locals>.<genexpr>*!G!Gq-"2"2!G!G!G!G!G!Grrc34K|]}t|VdSrrbrds  rriz _strip_extras.<locals>.<genexpr>rfrrc34K|]}t|VdSrrbrds  rriz _strip_extras.<locals>.<genexpr>rfr)rr_AnnotatedAliasrcr_r1rUrVrTr rr"rqrrrrreduceoperatoror_)r
stripped_argss  rrcrc
sa/00	/ ...1l##	0;PX8Y(Y(Y A///a-..	.!!G!GAJ!G!G!GGGM
**;;}---6>**	Dz!V=P/Q/Q	D!!G!GAJ!G!G!GGGM
**&q|]CCC6;''	AJq&:J,K,K	A!!G!GAJ!G!G!GGGM
**#HL-@@@rctj|||d}tjdkrt	|||||r|Sd|DS)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, ...]', 'Required[T]' or 'NotRequired[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.
        T)globalnslocalnsinclude_extrasrc4i|]\}}|t|Srrb)rgkrs   rrz"get_type_hints.<locals>.<dictcomp>Ms&===1=##===r)rr<rr_clean_optionalr")rrorprqhints     rr<r<%sr@$(GD


g%%Cx999	K==

====rcjt|tjsdS|jdturdSdS)z detects Union[..., None] patternFrT)rr_UnionGenericAliasr 	_NoneTypers r_could_be_inserted_optionalryQs7!V677	5:b>**5trc(|rt|trdStj|}|sdS|j}|D]C\}}t
|r||vs||"||}|t}t|tr|at|tj
r|j}n:|}	t|	dr|	j
}	t|	dt|	di}||}n||}t|t|tj
}tj|||}
|
|ksIttdr9t|
tjrt|tjs|
||<EdS)N__wrapped____globals__)is_argumentr)rrr
_get_defaultsrr"ryrxrr
ModuleTyperr1r{rBr`
_eval_typer)rhintsrorprZoriginal_hintsrroriginal_valuensobjoriginal_evaluateds           rrtrt[s	
3--	F',,	F, ;;==(	1(	1KD%/66
x''D>-+D1N%!*.#..
#!#v'899E#&< #%e];;6$)$5E&e];;6#*5-#D#D"*_&G!+"$.sF4E$F$F F""""(!2>8W!U!U"U**,,+163CDD+#5&*:;;	+1dQ(	1(	1rct|tjrtSt|tjt
jttfr|j	S|tj
urtj
SdS)a6Get 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
            get_origin(P.args) is P
        N)rrrir+_BaseGenericAliasrrrr
r_rcr]s rr9r9sib&011	b63V5H(/;<<	!= 
>!trcTt|tjr|jg|jRSt|tjtjfrW|j}t|tjjur.|dturt|dd|df}|SdS)aGet 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)
        rNrr)rrrir___metadata__rrrr r9rrr\Ellipsisr9)rress  rr8r8sb&011	5M4BO444b6/1DEFF	+C"~~!999c!fH>T>TCH~~s2w/JrrrKc&t|d)a&Special marker indicating 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.
         is not subscriptablerrs  rrKrKs4666777rc*fd|_|_dS)NctuSr)rWrsr<lambda>z_set_default.<locals>.<lambda>sWI%=r)has_default__default__)
type_paramrs `r_set_defaultrs"====J$JrcDtd}|dkr	||_dSdS)Nrrry)rr)typevarlikedef_mods  r_set_modulers4AG%%%!(&%rceZdZdZdZeZdS)
_DefaultMixinzMixin for TypeVarLike defaults.rN)rrrrrrrrrrrrs))IHHHrrceZdZdedefdZdS)_TypeVarLikeMeta_TypeVarLikeMeta__instancerc,t||jSr)r_backported_typevarlike)rrs  rrz"_TypeVarLikeMeta.__instancecheck__s*c&ABBBrN)rrrrboolrrrrrrs>C3C4CCCCCCrr)rc<eZdZdZejZdddedddZddZ	dS)	rzType variable.NF)boundrrrinfer_variancec 	ttdrtj|g|R||||d	n3tj|g|R|||d	|r|s|rtd|	_t	|t
		fd}|	_	S)NrLrrrrrrrz1Variance cannot be specified with infer_variance.cr6|jt|kr|jfz
}|Sr)r__parameters__indexr:r)aliasrtypevars  r_tvar_prepare_substz,TypeVar.__new__.<locals>._tvar_prepare_substsN''))3,227;;s4yyHHW022Dr)r1rrr__infer_variance__rr__typing_prepare_subst__)
rrrrrrrconstraintsrrs
         @rrzTypeVar.__new__sv//

< .HHH53<M8FHHH!.[[[53<M[[[!ZyZMZ$%XYYY-;*'***   




0CG,Nrrc2tdtd)Ntype 'z(.TypeVar' is not an acceptable base typerrs rrzTypeVar.__init_subclass__sWXWWWXXXrrN)
rrrrrrrrWrrrrrrrsb"(.37#5%e					:	Y	Y	Y	Y	Y	Yrrrc"eZdZdZdZdZdZdS)
_Immutablez3Mixin to indicate that object should not be copied.rc|Srrrs r__copy__z_Immutable.__copy__%Krc|Srr)rmemos  r__deepcopy__z_Immutable.__deepcopy__(rrN)rrrrrrrrrrrr!s=AA									rrc$eZdZdZdZdZdZdS)raQThe args for a ParamSpec object.

        Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.

        ParamSpecArgs objects have a reference back to their ParamSpec:

        P.args.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        c||_dSrr_rrXs  rrzParamSpecArgs.__init__7
$DOOOrc |jjdS)Nz.argsr_rrs rrzParamSpecArgs.__repr__:so.5555rcZt|tstS|j|jkSr)rrr*r_rs  rr.zParamSpecArgs.__eq__=s*e]33
&%%?e&666rNrrrrrrr.rrrrr+sK
	
		%	%	%	6	6	6	7	7	7	7	7rc$eZdZdZdZdZdZdS)r
a[The kwargs for a ParamSpec object.

        Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.

        ParamSpecKwargs objects have a reference back to their ParamSpec:

        P.kwargs.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        c||_dSrrrs  rrzParamSpecKwargs.__init__Nrrc |jjdS)Nz.kwargsrrs rrzParamSpecKwargs.__repr__Qso.7777rcZt|tstS|j|jkSr)rr
r*r_rs  rr.zParamSpecKwargs.__eq__Ts*e_55
&%%?e&666rNrrrrr
r
BsK
	
		%	%	%	8	8	8	7	7	7	7	7rr
)rrc<eZdZdZejZddddeddZddZ	dS)	rzParameter specification.NFrrrrrcttdrtj|||||n,tj||||t|_t|t
fd}|_S)NrLrrc|j}|}|t|krrg|j}|t|krtd|t|dkr&t
j|ds|dksJ|f}nJt||tr/g|d|t||||dzdR}|S)NToo few arguments for rr)rrr:rrrr_is_param_exprrr9r")rrr#i	paramspecs    r_paramspec_prepare_substz3ParamSpec.__new__.<locals>._paramspec_prepare_substxs-LL++D		>>i&;&;&=&=>9T99#89DD		>>#$DU$D$DEEEv;;!##F,A$q',J,J#6666 7DDQ..FET"1"XEuT!W~~EQUVVEEDr)r1rrrrrrr)	rrrrrrrrrs	        @rrzParamSpec.__new__fsv//

D",T7@;H<JLLL		
#,T7@;HJJJ	04N/C/C	,G,,,	"""




 2JI.rrc2tdtdNrz*.ParamSpec' is not an acceptable base typerrs rrzParamSpec.__init_subclass__YXYYYZZZrr)
rrrrrrrrWrrrrrrrasd&&"("2(,#5#()#	#	#	#	#	J	[	[	[	[	[	[rceZdZdZejZedZedZ	dddde
ddZdZd	Z
d
ZdZdZddZdS)ra'Parameter specification variable.

        Usage::

           P = ParamSpec('P')

        Parameter specification variables exist primarily for the benefit of static
        type checkers.  They are used to forward the parameter types of one
        callable to another callable, a pattern commonly found in higher order
        functions and decorators.  They are only valid when used in ``Concatenate``,
        or s the first argument to ``Callable``. In Python 3.10 and higher,
        they are also supported in user-defined Generics at runtime.
        See class Generic for more information on generic types.  An
        example for annotating a decorator::

           T = TypeVar('T')
           P = ParamSpec('P')

           def add_logging(f: Callable[P, T]) -> Callable[P, T]:
               '''A type-safe decorator to add logging to a function.'''
               def inner(*args: P.args, **kwargs: P.kwargs) -> T:
                   logging.info(f'{f.__name__} was called')
                   return f(*args, **kwargs)
               return inner

           @add_logging
           def add_two(x: float, y: float) -> float:
               '''Add two numbers together.'''
               return x + y

        Parameter specification variables defined with covariant=True or
        contravariant=True can be used to declare covariant or contravariant
        generic types.  These keyword arguments are valid, but their actual semantics
        are yet to be decided.  See PEP 612 for details.

        Parameter specification variables can be introspected. e.g.:

           P.__name__ == 'T'
           P.__bound__ == None
           P.__covariant__ == False
           P.__contravariant__ == False

        Note that only parameter specification variables defined in global scope can
        be pickled.
        c t|Sr)rrs rrzParamSpec.argss &&&rc t|Sr)r
rs rrzParamSpec.kwargss"4(((rNFrcBt||g||_t||_t||_t||_||_t||t}|dkr	||_
dSdSNry)r9rrr
__covariant____contravariant__r	__bound__rrrrrrrrrrrs        rrzParamSpec.__init__sMM$''' DM!%iD%)-%8%8D"&*>&:&:D#"DN""4111iiG---").-rcV|jrd}n|jrd}n|jrd}nd}||jzSN+-~rrrrrprefixs  rrzParamSpec.__repr__J&
#
'
DM))rc6t|Srrr2rs rr2zParamSpec.__hash__??4(((rc
||uSrrrs  rr.zParamSpec.__eq__5= rc|jSrrrs rrzParamSpec.__reduce__
= rcdSrrrs   rrzParamSpec.__call__Drrc2tdtdrrrs rrzParamSpec.__init_subclass__rrr)rrrrrrrrrrrWrrr2r.rrrrrrrrs,	,	^N			'	'
	'
	)	)
	)+/%u$)9
	*
	*
	*
	*
	*		*		*		*	)	)	)	!	!	!	!	!	!				[	[	[	[	[	[rr
_type_convert)allow_special_formsc|tdSt|trRtjdkrt|Stjdkrt||St|||S|S)z=For converting None to type(None), and strings to ForwardRef.N)r	)rrr)ris_class)rrrrrr`)rrrs   rrrs|{Dzz!#s##
T#y00%c??*#y00%c&9999!#f?RSSSSJrcVeZdZejZdZdZdZdZ	e
dZdZdZ
dS)	_ConcatenateGenericAliascXt||||_||_dSr)r9rr_r )rrXrs   rrz!_ConcatenateGenericAlias.__init__s*
MM$%%%$DO DMMMrctj|jddfd|jDdS)N[, c3.K|]}|VdSrr)rgr
_type_reprs  rriz4_ConcatenateGenericAlias.__repr__.<locals>.<genexpr>s+!K!Kc**S//!K!K!K!K!K!Kr])rrr_joinr )rrs @rrz!_ConcatenateGenericAlias.__repr__sd*J!z$/22OO		!K!K!K!KT]!K!K!KKKOOO
Prc8t|j|jfSr)r0r_r rs rr2z!_ConcatenateGenericAlias.__hash__s$-8999rcdSrrrs   rrz!_ConcatenateGenericAlias.__call__ rrc>td|jDS)Nc3\K|]'}t|tjtf#|V(dSr)rrrr)rgrs  rriz:_ConcatenateGenericAlias.__parameters__.<locals>.<genexpr>%sLjfni=X.Y.Yr)r"r rs rrz'_ConcatenateGenericAlias.__parameters__#s2!]
rczt|dtrg|dd|djR}nkt|dttfrg|dd|dRS|ddus*t|dt
st
d||j|SNr.MThe last parameter to Concatenate should be a ParamSpec variable or ellipsis.)	rrr r9r"rrrr_rr#s  rrqz"_ConcatenateGenericAlias.copy_with*s&*&>??
;=6#2#;=)<==F2Ju
66
;22vbz222bzS((Jvbz9,M,M(!:;;;>>$/6:::rc
H|jttfvrtd||jst|dt|ts|f}td|D}|j}|D]G}t|dd}|
|||}#t|tr|
|}|t|kr(t|dtturg||j
}|t|krtd|t|dkr!t|ds|dksJ|f}t||trJt||t s/g|d|t
||||dzdR}It|}t|}||kr#td	||krd
ndd|d
|d|t#t%|j|g}|jD]O}	t|	t(r||	.t|	t,r|	}	t|	t.jrt3|	s@t5t6dr=t|	t6jr#t|	ddrt|	dnst|	t5t6dst.jnt.jt6jfr,|	j}
|
r#t
fd|
D}|	|}	||	Q|t
|S)Nz%Cannot subscript already-subscripted  is not a generic classc34K|]}t|VdSr)rrgr$s  rriz7_ConcatenateGenericAlias.__getitem__.<locals>.<genexpr>>s*!A!Aq-"2"2!A!A!A!A!A!Arrrrrrrkrlrmrnrorpr__unpacked__Fz is not valid as type argumentc3(K|]}|V
dSrr)rgxsubsts  rriz7_ConcatenateGenericAlias.__getitem__.<locals>.<genexpr>|s''D'DQa'D'D'D'D'D'Dr)r_rcrDrrrr"_unpack_argsrBrrr:rWrrr9rr0zipr rr!rrr
_is_unpackr1rrrq)
rrr#paramprepareralenplennew_argsr	subparamssubargsrs
            @rr
z$_ConcatenateGenericAlias.__getitem__5s7H"555 N N NOOO&
B4 @ @ @AAAdE**
w!A!AD!A!A!ABD(F
J
J!%)CTJJ&"74..DDy11JU++ASYY#E=)DDIUU99u'89CII~~'(G(G(GHHH6{{a''tAw0G0G' Avvvv $w"47D11J!+474L M M	J JbqbI5a>>IDQLIIt99Dv;;Dt||7TD[[66e77D77#770477
T0$7788EH}
%
%c4((OOC(((c7+++*C#C)=>>PCMc??P$FN;;P!+30C D D	P
!(^U C CP(3(N(N(NOOO"6>::@F(()6+>?+
!$ 2I +"''D'D'D'D)'D'D'D"D"D!'l$$$$>>%//222rN)rrrrrrrrr2rrrrqr
rrrrrs(		!	!	!	P	P	P
	:	:	:			
		
		;	;	;J	3J	3J	3J	3J	3rrc,eZdZdZfdZfdZxZS)rrct|dttfrg|dd|dRSt|dtjrg|dd|djR}n4|ddus*t|dtstdttj|	|Sr)
rr9r"rrr rrrrq)rr#rs  rrqz"_ConcatenateGenericAlias.copy_withsfRj4-8876VCRC[66":666fRj&*IJJ?Avcrc{AVBZ-@AAFF *++z&*i/P/P+#%>???V<dCCMMfUUUrct|}t|tr9t	d|Dr ttd|DS|S)Nc34K|]}t|VdSrr)rgrs  rriz7_ConcatenateGenericAlias.__getitem__.<locals>.<genexpr>s(3Q3QaJqMM3Q3Q3Q3Q3Q3Qrc3K|]}|VdSrr)rgrs  rriz7_ConcatenateGenericAlias.__getitem__.<locals>.<genexpr>s"/A/Aa/A/A/A/A/A/Ar)rr
rr"rr)rrrrs   rr
z$_ConcatenateGenericAlias.__getitem__ss++D11eU++D3Q3Q53Q3Q3Q0Q0QD /A/A5/A/A/A!BCCCr)rrrrqr
rrs@rrrs[!J
V
V
V
V
V








rceZdZdS)_EllipsisDummyN)rrrrrrr$r$srr$c|ddur$tjdkrg|ddtR}tjdkr t||tt
fd}nt||}|dtur|St
d|jD|_tjdkr|St
d	|jD|_|S)
Nr.)rrr)rrrT)_typevar_types_paramspec_tvarsc30K|]}|tur|ndVdS).Nr$rs  rriz,_create_concatenate_alias.<locals>.<genexpr>sL!C!C()'(~&=&=3!C!C!C!C!C!Crrc3,K|]}|tu|VdSrr)rs  rriz,_create_concatenate_alias.<locals>.<genexpr>s<'D'DQ+,N+B+B()+B+B+B+B'D'Dr)	rrr$rrrr"r r)rXrconcatenates   r_create_concatenate_aliasr,s"~!1I!=!=7z#2#777

:%%.vz8?7K9=???/vzBB"~^++ !C!C-8-A!C!C!CCCK
'!!!&'D'D+2L'D'D'D"D"DKrc,|dkrtdt|ts|f}|ddus*t|dtstddgfd|ddD|dR}t	||S)Nrz&Cannot take a Concatenate of no types.r.r	z/Concatenate[arg, ...]: each arg must be a type.c3BK|]}tj|VdSrrdrfs  rriz'_concatenate_getitem.<locals>.<genexpr>s0HH1F&q#..HHHHHHr)rrr"rr,)rrrhs  @r_concatenate_getitemr/sR@AAAj%((# ]
rNc!!Z
2	%J%J!:;;	;
;C$HHHH
3B3HHH$rN$$J$T:666rc"t||S)a&Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        )r/rs  rrrs$D*555rrNc^tj||d}tj||fS)a	Special typing form 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).
         accepts only a single type.rrerrrrs   rrNrNs5X!*.S.S.STT#D4'222rrOc^tj||d}tj||fS)awSpecial typing form used to annotate the return type of a user-defined
        type narrower function.  ``TypeIs`` only accepts a single type argument.
        At runtime, functions marked this way should return a boolean.

        ``TypeIs`` 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 ``TypeIs[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeIs`` 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 intersection of the type inside ``TypeIs`` and the argument's
        previously known type.

        For example::

            def is_awaitable(val: object) -> TypeIs[Awaitable[Any]]:
                return hasattr(val, '__await__')

            def f(val: Union[int, Awaitable[int]]) -> int:
                if is_awaitable(val):
                    assert_type(val, Awaitable[int])
                else:
                    assert_type(val, int)

        ``TypeIs`` also works with type variables.  For more information, see
        PEP 742 (Narrowing types with TypeIs).
        r2r3r4s   rrOrO	s5L!*.S.S.STT#D4'222rrMceZdZdZdS)
_TypeFormFormc|Srrrs  rrz_TypeFormForm.__call__J	JrN)rrrrrrrr7r7G	s#					rr7c^tj||d}tj||fS)aA special form representing the value that results from the evaluation
        of a type expression. This value encodes the information supplied in the
        type expression, and it represents the type described by that type expression.

        When used in a type expression, TypeForm describes a set of type form objects.
        It accepts a single type argument, which must be a valid type expression.
        ``TypeForm[T]`` describes the set of all type form objects that represent
        the type T or types that are assignable to T.

        Usage:

            def cast[T](typ: TypeForm[T], value: Any) -> T: ...

            reveal_type(cast(int, "x"))  # int

        See PEP 747 for more information.
        r2r3r4s   rrMrMM	s4&!*.S.S.STT#D4'222rr
c&t|d)aDRepresents an arbitrary literal string.

        Example::

          from typing_extensions import LiteralString

          def query(sql: LiteralString) -> ...:
              ...

          query("SELECT * FROM table")  # ok
          query(f"SELECT * FROM {input()}")  # not ok

        See PEP 675 for details.

        rrr
s  rr
r
i	s"4666777rrc&t|d)zUsed to spell the type of "self" in classes.

        Example::

          from typing import Self

          class ReturnsSelf:
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        rrr
s  rrr	s4666777rrRc&t|d)aThe 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_extensions 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

        rrr
s  rrRrR	s04666777rrUchtj||jd}tj||fS)aA special typing construct to mark a key of a total=False TypedDict
        as required. 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.
        r2rrerrr4s   rrUrU	s6"!*.Y.Y.YZZ#D4'222rchtj||jd}tj||fS)a`A special typing construct to mark a key of a TypedDict 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,
            )
        r2r?r4s   rrVrV	s6!*.Y.Y.YZZ#D4'222rchtj||jd}tj||fS)aA special typing construct to mark an item of a TypedDict as read-only.

        For example:

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

            def mutate_movie(m: Movie) -> None:
                m["year"] = 1992  # allowed
                m["title"] = "The Matrix"  # typechecker error

        There is no runtime checking for this property.
        r2r?r4s   rrTrT	s6 !*.Y.Y.YZZ#D4'222raType 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]): ...

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

  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 PEP 646 and PEP 692.
c.t|tuSr)r9rrs rrr 
s#&((rceZdZfdZxZS)_UnpackSpecialFormcbt|t|_dSr)rr_UNPACK_DOCr)rrrs  rrz_UnpackSpecialForm.__init__%
s&GGW%%%&DLLLr)rrrrrrs@rrErE$
s8	'	'	'	'	'	'	'	'	'rrEcdeZdZejdkrejZedZ	edZ
dZdS)_UnpackAliasrc|jtusJt|jdksJ|j\}t	|t
jtjfr$|jturtd|jSdS)Nrz*Unpack[...] must be used with a tuple type)r_rr:r rrrrrr"r)rrs  r__typing_unpacked_tuple_args__z+_UnpackAlias.__typing_unpacked_tuple_args__.
s?f,,,,t}%%****=DC# 4f6IJKK
$>..#$PQQQ|#4rc|jtusJt|jdksJt	|jdt
S)Nrr)r_rr:r rrrs r#__typing_is_unpacked_typevartuple__z0_UnpackAlias.__typing_is_unpacked_typevartuple__9
sG?f,,,,t}%%****dmA.===rcT|jr|Stj||Sr)rMrrr
rZs  rr
z_UnpackAlias.__getitem__?
s-7
'33D$???rN)rrrrrrrrrrKrMr
rrrrIrI)
sqg%%I			
	
	>	>
	>
	@	@	@	@	@rrIc^tj||jd}t||fS)Nr2)rrerrIr4s   rrrG
s1!*.Y.Y.YZZD4'***rc,t|tSr)rrIrCs rrrL
s#|,,,rcg}|D]L}t|dd}|"|r
|ddus||7||M|S)NrKr.)rBrr!)rnewargsrrs    rrrP
spG  #?FFWR[C5G5GNN7####NN3Nr)r)rrc:eZdZdZejZddddeddZdZ	dS)rzType variable tuple.NFrcHtrtj||n$tj|t||_t|_t|_t|_tfd}|_
S)Nrc	r|j}|}||dzdD])}t|trt	d|*t|}t|}|}||z
dz
}d}	d}
t
|D]e\}}t|tsKt|dd}
|
r8t|
dkr%|
ddur|	t	d|}	|
d}
f|	't||	}t|||	z
dz
}n$||z|krt	d	|d
|d|dz
|||z
kr)
rtj}n
||||z
}g|d||
g||z
z||
g||z
|z
|z
dz
z|||z
dRS)Nrz(More than one TypeVarTuple parameter in rKrr.z6More than one unpacked arbitrary-length tuple argumentrrroz, expected at least )
rrrrrr:	enumeraterrBminrrr)rrr#typevartuple_indexrrrleftrightvar_tuple_indexfillargrsrrreplacementtvts               r_typevartuple_prepare_substz9TypeVarTuple.__new__.<locals>._typevartuple_prepare_substx
s-%+\\#%6%6"#$6$:$;$;<E!%66'NuNN
4yy6{{)11A5"&'oo
1
1FAs%c400	1")#/OQU"V"V"1s7||q'8'8WR[C=O=O.:&/%F'"'"!"/0O&-ajG".t_55Dto'='ABBEEE\D((#%TU%T%T/3%T%TIMPQ%T%TUUU4%<''COO,=,='".s"?"?KK"&tTE\'9":K%4%[i#5#<= i4%<$#69K#Ka#OP	
$,--(r)_PEP_696_IMPLEMENTEDrrrrrrrrrr)	rrrrrrrr`r_s	        @rrzTypeVarTuple.__new__f
s$
+)$@@@)$//S'***!CM $YC$($7$7C!%).%9%9C"+
+
+
+
+
Z,GC(Jrc td)N&Cannot subclass special typing classesrrs   rrzTypeVarTuple.__init_subclass__
sDEEEr)
rrrrrrrrWrrrrrrra
sc"""("5(,#5#()@	@	@	@	@	D	F	F	F	F	FrcXeZdZdZejZdZddddeddZ	dZ
dZd	Zd
Z
dZdS)raType variable tuple.

        Usage::

            Ts = TypeVarTuple('Ts')

        In the same way that a normal type variable is a stand-in for a single
        type such as ``int``, a type variable *tuple* is a stand-in for a *tuple*
        type such as ``Tuple[int, str]``.

        Type variable tuples can be used in ``Generic`` declarations.
        Consider the following example::

            class Array(Generic[*Ts]): ...

        The ``Ts`` type variable tuple here behaves like ``tuple[T1, T2]``,
        where ``T1`` and ``T2`` are type variables. To use these type variables
        as type parameters of ``Array``, we must *unpack* the type variable tuple using
        the star operator: ``*Ts``. The signature of ``Array`` then behaves
        as if we had simply written ``class Array(Generic[T1, T2]): ...``.
        In contrast to ``Generic[T1, T2]``, however, ``Generic[*Shape]`` allows
        us to parameterise the class with an *arbitrary* number of type parameters.

        Type variable tuples can be used anywhere a normal ``TypeVar`` can.
        This includes class definitions, as shown above, as well as function
        signatures and variable annotations::

            class Array(Generic[*Ts]):

                def __init__(self, shape: Tuple[*Ts]):
                    self._shape: Tuple[*Ts] = shape

                def get_shape(self) -> Tuple[*Ts]:
                    return self._shape

            shape = (Height(480), Width(640))
            x: Array[Height, Width] = Array(shape)
            y = abs(x)  # Inferred type is Array[Height, Width]
            z = x + x   #        ...    is Array[Height, Width]
            x.get_shape()  #     ...    is tuple[Height, Width]

        c#K|jVdSr)rrs r__iter__zTypeVarTuple.__iter__
s######rNFrc*||_t||_t||_t||_||_t||t}|dkr||_	t||_dSr)rrrrrrrrrrrrrs        rrzTypeVarTuple.__init__
s DM!%iD%)-%8%8D"&*>&:&:D#"DN""4111iiG---") &tDrcV|jrd}n|jrd}n|jrd}nd}||jzSrrrs  rrzTypeVarTuple.__repr__
rrc6t|Srrrs rr2zTypeVarTuple.__hash__
rrc
||uSrrrs  rr.zTypeVarTuple.__eq__
rrc|jSrrrs rrzTypeVarTuple.__reduce__
rrc,d|vrtddS)Nrrcrrs   rrzTypeVarTuple.__init_subclass__s$d"" HIII#"r)rrrrrrrrfrWrrr2r.rrrrrrr
s)	)	XN		$	$	$+/%u$)9	-	-	-	-	- 		*		*		*	)	)	)	!	!	!	!	!	!	J	J	J	J	JrrGrrcftdt|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)printrrrstderrrCs rrGrG
s0 	7c!377cjIIII
r_ASSERT_NEVER_REPR_MAX_LENGTHdr,rct|}t|tkr|dtdz}td|)a1Assert to the type checker 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.

        N...z*Expected code to be unreachable, but got: )rr:rqAssertionError)rrs  rr,r,'sN(S		u::5558889EAEQ%QQRRRr)
eq_default
order_defaultkw_only_defaultfrozen_defaultfield_specifiersrvrwrxryrz.rc&fd}|S)aDecorator that marks a function, class, or metaclass as providing
        dataclass-like behavior.

        Example:

            from typing_extensions import dataclass_transform

            _T = TypeVar("_T")

            # Used on a decorator function
            @dataclass_transform()
            def create_model(cls: type[_T]) -> type[_T]:
                ...
                return cls

            @create_model
            class CustomerModel:
                id: int
                name: str

            # Used on a base class
            @dataclass_transform()
            class ModelBase: ...

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

            # Used on a metaclass
            @dataclass_transform()
            class ModelMeta(type): ...

            class ModelBase(metaclass=ModelMeta): ...

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

        Each of the ``CustomerModel`` classes defined in this example will now
        behave similarly to a dataclass created with the ``@dataclasses.dataclass``
        decorator. For example, the type checker will synthesize an ``__init__``
        method.

        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()``.

        At runtime, this decorator records its arguments in the
        ``__dataclass_transform__`` attribute on the decorated object.

        See PEP 681 for details.

        c$d|_|S)N)rvrwrxryrzr)__dataclass_transform__)	cls_or_fnrvrzryrxrrws r	decoratorz&dataclass_transform.<locals>.decorators,(!.#2"0$4 
11I-rr)rvrwrxryrzrrs`````` rr/r/FsCR																				rrC_F)rcF	d|_n#ttf$rYnwxYw|S)aHIndicate 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 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 these properties. The decorator
        sets the ``__override__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.

        See PEP 698 for details.

        T)__override__rrrs rrCrCs@4	#C	*			
D		

r)rr})rrr_Tc	xeZdZdZedddedejeje	de
ddfd	Zd
edeffdZ
xZS)r0aIndicate that a class, function or overload is deprecated.

        When this decorator is applied to an object, the type checker
        will generate a diagnostic on usage of the deprecated object.

        Usage:

            @deprecated("Use B instead")
            class A:
                pass

            @deprecated("Use g instead")
            def f():
                pass

            @overload
            @deprecated("int support is deprecated")
            def g(x: int) -> int: ...
            @overload
            def g(x: str) -> int: ...

        The warning specified by *category* will be emitted at runtime
        on use of deprecated objects. For functions, that happens on calls;
        for classes, on instantiation and on creation of subclasses.
        If the *category* is ``None``, no warning is emitted at runtime.
        The *stacklevel* determines where the
        warning is emitted. If it is ``1`` (the default), the warning
        is emitted at the direct caller of the deprecated object; if it
        is higher, it is emitted further up the stack.
        Static type checker behavior is not affected by the *category*
        and *stacklevel* arguments.

        The deprecation message passed to the decorator is saved in the
        ``__deprecated__`` attribute on the decorated object.
        If applied to an overload, the decorator
        must be after the ``@overload`` decorator for the attribute to
        exist on the overload as returned by ``get_overloads()``.

        See PEP 702 for details.

        rcategoryrmessagerrrNct|ts$tdt|j||_||_||_dS)Nz2Expected an object of type str for 'message', not )rrrrrrrr)rrrrs    rrzdeprecated.__init__s^gs++
2G}}-22#DL$DM(DOOOrrc0	

|j
|j	|j
		
_St	t
rddl}ddlm}j	|j
	

fd}t|_	djvr=j
t	|rj|j
	

fd}n		

fd}t|_

x_|_
|_St!r|ddl}ddl}|j
	

fd}|jr6t&jdkr|j|}nddl}|jj|_
x_|_|St3d	)
Nr)
MethodTypec|urtjdztjur|g|Ri|S|jtjur|s|rt|jd|S)Nrrz() takes no arguments)rrrrrrr)rrrrrrhoriginal_newrs   rrz$deprecated.__call__.<locals>.__new__sczz 
cHVWXXXX#6>99+|CA$AAA&AAA88d8f8'3<(N(N(NOOO+|C000rrcHtjdz|i|SNrrrr)rrrrhoriginal_init_subclassrs  rrz.deprecated.__call__.<locals>.__init_subclass__/s5 
cHVWXXXX55tFvFFFrcntjdzt|j|i|Sr)rrrr)rrrrrrrhrs   rrz.deprecated.__call__.<locals>.__init_subclass__4s? 
cHVWXXXX@uS#@$Q&QQQrcHtjdz|i|Srr)rrrrrhrs  rwrapperz$deprecated.__call__.<locals>.wrapperAs4M#ZRS^TTTT3////rrzY@deprecated decorator with non-None category must be applied to a class or callable, not )rrr__deprecated__rrrtypesrrwrapsstaticmethodrrrAclassmethodrriscoroutinefunctionrrmarkcoroutinefunctionasyncio.coroutines
coroutines
_is_coroutiner)rrrrrrrrasynciorrhrrrrs `       @@@@@rrzdeprecated.__call__s,C}HJ%("
C&&E
    ,,,,,,"{ ..	1	1	1	1	1	1	1	1/.	1+733&#,66.1-B*
""8*EEQ1G1P.$Y_%;<<GGGGGGG=<GGRRRRRRRRR)44E(F(F%>AA"W%;36!0
#
     %%0000000&%0/7.s33Q'722"?'"?"H"H1111070B0P->AA"W%;80388r)rrrrrrrrqrWarningrrrrrrs@rr0r0s(	(	\?Q
	)	)	)	)
ofk'&:;	)
	)	)	)	)	)"N	N	"N	N	N	N	N	N	N	N	N	N	rr0cZ|dup't|ttttfSN.)rr"r9rrrs rrrYs.cz
Z%y*BC

	
rcp|dup2t|ttttt
jfSr)rr"r9rrrrs rrr^s9cz	
Z(/
	
	
		
rctj|rkt|tjrQt|jdkr9t|jdtr|rt|dsdS|st|d|tur=t|dr|jst|dt|j}t|}||kr|}t|drd|jD}td|D}|dkr|||z
krdS||krHt||dtturdStd	|D}||z}d
|}t jdkrdnd
}td||krdndd|d|d|d|
dS)Check correct count for parameters of a generic cls (internal helper).

        This gives a nice error message in case of count mismatch.
        rrNrrc0g|]}t||Srr!rs  r
<listcomp>z"_check_generic.<locals>.<listcomp>#QQQA:a==QaQQQrc3@K|]}t|tVdSr)rrrs  rriz!_check_generic.<locals>.<genexpr>s,#T#TAJq,$?$?#T#T#T#T#T#Trrc3PK|]!}t|dttuV"dSrNrBrWrs  rriz!_check_generic.<locals>.<genexpr>R)O)O>?*1M9)M)M09*:)O)O)O)O)O)Orrjr	argumentsrrkrlrm z for rorp)risclassrrrcr:rrrrrrJr1sumrBrWrr)rrelenr
expect_val
num_tv_tuplesnum_default_tvthingss        r_check_genericrssx
OC  	ZV^%D%D	C&''1,,3-a0)<<--#:a=11-
F	=s;;;<<<7??3 011
A9K
A3 ? ? ?@@@s)**D:4<<Js,--
4QQ);QQQ
 ##T#T#T#T#T T T
!A%%DD=4H,H,HF$;; 
4 0-KK())%()O)OCM)O)O)O&O&ONN*D!3T!3!3J%($4$?$?[[\FPTD[[66ePPfPP$'PP26PPCMPPQQ
Q9<rc
|st|dt|}||kr|}t|dr_d|jD}||krHt	||dt
t
urdSt
d|D}||z}d|}td||krd	nd
d|d|d
|dS)rrrc0g|]}t||Srr!rs  rrz"_check_generic.<locals>.<listcomp>rrrNc3PK|]!}t|dttuV"dSrrrs  rriz!_check_generic.<locals>.<genexpr>rrrjrkrlrmrnrorp)rr:r1rrBrWr)rrrrrrs      rrrsN
	=s;;;<<<:4<<Js,--
4QQ);QQQ
$;; 
4 0-KK())%()O)OCM)O)O)O&O&ONN*D!3T!3!3JPTD[[66ePP$'PP26PPCMPPQQ
Q/<rc	tjd}|jddkrdS|jd}|t
jup|tup
|t
juS#ttf$rYdSwxYw)NrrrFrX)
rrrrf_localsrrcrDrr)framerXs  r"_has_generic_or_protocol_as_originrs[
a  ?z**h665##H--'Z6X+=Z6?AZZ
J'uusA55B
	B
ct|turdSt|}t|o.t	|dkot|dtvS)NFrr)r9rr8rr:r_TYPEVARTUPLE_TYPES)rrs  r_is_unpacked_typevartuplers[!}}F""uA;;DT

	1IIN	1aMM00r_collect_type_varsc	|tj}g	t}d}d}|D]}t|rd}nt	||rxt	|t
sc|	vr_|rHt
|dttu}|r|rtdd}n|rtd|d		|t|r'		fd|jDt	|tr1|D].}t|gD]}|	vr		|/t	S)	zCollect all type variable contained in types in order of
        first appearance (lexicographic order). For example::

            _collect_type_vars((T, List[S, T])) == (T, S)
        NFTr2Type parameter with a default follows TypeVarTupleType parameter 8 without a default follows type parameter with a defaultcg|]}|v|	Srr)rgrtvarss  rrz&_collect_type_vars.<locals>.<listcomp>
sLLLAQe^^a^^^r)rrrrrrIrBrWrr!rrrr"r)
r
typevar_typesenforce_default_orderingdefault_encounteredtype_var_tuple_encounteredrrr	collectedrs
         @rrrs "NM$F#G#G #&+"	4	4A(++
 -1**1m,,
 5?<5P5P
 UNN+	R")!]I"F"Fi"WK"R5E"+-D#E#EE.2++,R')Q!)Q)Q)QRRRQ.q11
4LLLL)9LLLMMMMAu%%
444A%7%<%<44	$E11!LL3334U||rcxg}t}d}d}|D]}t|trt|tr2|D].}t	|gD]}||vr||/`t
|drf||vra|rJt|dttu}|r|rtd|rd}n|rtd|d||t|rd}t|dd	D]}||vr||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)
        F__typing_subst__rrTrrrr)rrrr"_collect_parametersr!r1rBrWrr)	rrrrrrrrrs	         rrr&
s
$F#G#G #&+""	-"	-A!T""!
-Au%%
-99A%8!%=%=99	$J66&--i88899.//
-J&&/
V#A}i@@	Q$6E+E"+-D#E#EE'V26//0V"+-Ua-U-U-U#V#VV%%a(((,Q//615. $4b99--A
**"))!,,,-Z   rcd|D}d|D}tj||||}|x|_|j_|S)Ncg|]\}}|Srrrgrrs   rrz!_make_nmtuple.<locals>.<listcomp>k
s&&&1!&&&rc	Hi|]\}}|tj|d|d S)zfield z annotation must be a typerdrs   rrz!_make_nmtuple.<locals>.<dictcomp>l
sG***1a&,Q0V0V0V0VWW***rrZr)r
namedtuplerr)rrrrZrLrnm_tpls       r
_make_nmtuplerj
sm&&&&&**#(***'f19&JJJBMM!?
r>rrrceZdZdZdS)_NamedTupleMetac<t|vsJ|D](}|tur|tjurtd)t	d|D}dvr	d}ndvrdd}ni}g}|D]^}|vr|||r@td|dt
|dkrdnd	d
d|_t||	fd|Dd
}||_
tj|vr^ttdrttj
|_n*tjjj}	t|	|_	D]\}
}|
t vrt#d|
z|
t$vr|
|jvrt)||
|
	t+|j}	||||
m#t.$rX}
dt+|jd|
d|}t2jdkr|
|t9||
d}
~
wwxYw#t"$rYwxYwtj|vr||S)Nz3can only inherit from a NamedTuple type and Genericc3:K|]}|turtn|VdSr)_NamedTupler")rgrs  rriz*_NamedTupleMeta.__new__.<locals>.<genexpr>}
s0SST4;#6#6%%DSSSSSSrrr
rzNon-default namedtuple field z cannot follow default fieldsrrrc g|]
}|Srr)rgrr6s  rrz+_NamedTupleMeta.__new__.<locals>.<listcomp>
s777A"Q%777rrr_generic_class_getitemz&Cannot overwrite NamedTuple attribute zError calling __set_name__ on z
 instance z in r)rrrcrr"r!r:rrr"rr1rr__class_getitem__rA_prohibited_namedtuple_fieldsr_special_namedtuple_fields_fieldsr^r__set_name__
BaseExceptionrrradd_noteRuntimeErrorr)rrKrr6rr
default_names
field_namer
class_getitemkeyr`set_namerrhs   `           rrz_NamedTupleMeta.__new__w
sy%''''
O
O{**t6>/I/I#MOOOSSUSSSSSE B&&,-2%%*>*1--M#
C
C
##!((4444"C#%BJ%B%B.1-.@.@1.D.Dss"%B%B(,yy'?'?%B%BCCCC
#%++--7777777,'F
 %F~&&6#;<<J/:6;X/Y/YF,,$*N$D$MM/:=/I/IF,HHJJ
?
?S777()QTW)WXXX :::&.00RW555?#'99#9?$HS&#6666,???!DcAS!D!D,/!D!D7?!D!D  #/7:: !

3 %&23&7&7Q >?*;6~&&((***Ms+!I)6
H
I&AI!!I&)
I65I6N)rrrrrrrrrv
s(D	D	D	D	D	rrrc(t|vsJtfSr)rr)rs r_namedtuple_mro_entriesr
sU""""~rc|tur|rd}d}nLd}d|d|d}d|zdz}n8|%|rtd
d}d|d|d}d|zdz}n|rtd|tus|Etj||d
t
d|}t||t}tf|_
|S)aoTyped 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)])
        z3Creating NamedTuple classes using keyword argumentszq{name} is deprecated and will be disallowed in Python {remove}. Use the class-based or functional syntax instead.rFrHz = NamedTuple(z, [])`z{name} is deprecated and will be disallowed in Python {remove}. To create a NamedTuple class with 0 fields using the functional syntax, pass an empty list, e.g. rNz\Cannot pass `None` as the 'fields' parameter and also specify fields using keyword argumentsrGzIEither list of fields or keywords can be provided to NamedTuple, not bothz3.15)rr;rrr)rJrrrr'rr"rrrr)rKrLrrNrPrOnts       rrr
sn(W
"#X H 
$X HhHHhHHH0#
"#"^

"F
$N HhHHhHHH0#
"#"	HGHH
HWM&&,<V&LL"




\\^^F
8VGII
>
>
>'M	rceZdZdZdS)raBase class for classes that implement the buffer protocol.

        The buffer protocol allows Python objects to expose a low-level
        memory buffer interface. Before Python 3.12, it is not possible
        to implement the buffer protocol in pure Python code, or even
        to check whether a class implements the buffer protocol. In
        Python 3.12 and higher, the ``__buffer__`` method allows access
        to the buffer protocol from Python code, and the
        ``collections.abc.Buffer`` ABC allows checking whether a class
        implements the buffer protocol.

        To indicate support for the buffer protocol in earlier versions,
        inherit from this ABC, either in a stub file or at runtime,
        or use ABC registration. This ABC provides no methods, because
        there is no Python-accessible methods shared by pre-3.12 buffer
        classes. It is useful primarily for static checks.

        N)rrrrrrrrr
s				rr:c	|jd|jS#t$r&t	dt|jdwxYw)aReturn the class's "original" bases prior to modification by `__mro_entries__`.

        Examples::

            from typing import TypeVar, Generic
            from typing_extensions import NamedTuple, TypedDict

            T = TypeVar("T")
            class Foo(Generic[T]): ...
            class Bar(Foo[int], float): ...
            class Baz(list[str]): ...
            Eggs = NamedTuple("Eggs", [("a", int), ("b", str)])
            Spam = TypedDict("Spam", {"a": int, "b": str})

            assert get_original_bases(Bar) == (Foo[int], float)
            assert get_original_bases(Baz) == (list[str],)
            assert get_original_bases(Eggs) == (NamedTuple,)
            assert get_original_bases(Spam) == (TypedDict,)
            assert get_original_bases(int) == (object,)
        rz"Expected an instance of type, not N)rrrrrrrrs rr:r:(sf*	<##$4cmDDD			KT#YY5GKK
	s	"0AcVeZdZdZdZdZdZdZdZe	j
dkrdZd	Zd
Sd
S)rAaLNewType 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|Srrrs  rrzNewType.__call__Yr9rc||_d|vr|dd}||_||_t	}|dkr	||_dSdS)Nrrry)r
rpartitionr
__supertype__rr)rrrrs    rrzNewType.__init__\s` $Dd{{s++B/ DM!#DiiG---").-rc6|jGfdd}|fS)NceZdZfdZdS)&NewType.__mro_entries__.<locals>.Dummyc	D|j}td|d|dd)NzGCannot subclass an instance of NewType. Perhaps you were looking for: `z = NewType(rz)`)rr)rsubcls_name
supercls_names  rrz8NewType.__mro_entries__.<locals>.Dummy.__init_subclass__lsU"%,K#W'WW4?WWERWWWrN)rrrr)rsrDummyrks.rrr)rrrrs   @rrzNewType.__mro_entries__fsG!MM









8Orc$|jd|jS)Nr)rrrs rrzNewType.__repr__vso;;(9;;;rc|jSr)rrs rrzNewType.__reduce__ys$$rrc*tj||fSrrrs  rrzNewType.__or__rrc*tj||fSrrrs  rrzNewType.__ror__rrN)
rrrrrrrrrrrrrrrrrArAKs						*	*	*			 	<	<	<	%	%	%w&&
1
1
1
1
1
1
1
1'&rrAc|dup<t|ttjtjt
jtfSz:Corresponds to is_unionable() in unionobject.c in CPython.N)rrrrrrrLrCs r
_is_unionablers>$;*S# $3##
rcn|dup1t|ttjtjt
fSr)rrrrrrLrCs rrrs8$;*S# 	3##
r>r rrrr_rrr
__reduce_ex__rrrKceZdZdZdS)_TypeAliasGenericAliasct|tvrt||St|j|Sr) _ATTRIBUTE_DELEGATION_EXCLUSIONSrrrBr_)rrs  rrz"_TypeAliasGenericAlias.__getattr__s6;;;!--dD999t555rN)rrrrrrrr
r
s#
6
6
6
6
6rr
ceZdZdZdddefdZdededdffd	Zdedefd
Z	dedefdZ
defdZej
d
krddZdZdZdZdZdZej
dkr
dZdZxZSxZS)rLaCreate named, parameterized type aliases.

        This provides a backport of the new `type` statement in Python 3.12:

            type ListOrSet[T] = list[T] | set[T]

        is equivalent to:

            T = TypeVar("T")
            ListOrSet = TypeAliasType("ListOrSet", list[T] | set[T], type_params=(T,))

        The name ListOrSet can then be used as an alias for the type it refers to.

        The type_params argument should contain all the type parameters used
        in the value of the type alias. If the alias is not generic, this
        argument is omitted.

        Static type checkers should only support type aliases declared using
        TypeAliasType that follow these rules:

        - The first argument (the name) must be a string literal.
        - The TypeAliasType instance must be immediately assigned to a variable
          of the same name. (For example, 'X = TypeAliasType("Y", int)' is invalid,
          as is 'X, Y = TypeAliasType("X", int), TypeAliasType("Y", int)').

        r)type_paramsrct|tstdt|tstd||_||_d}g}|D]}t|tttfrt|rtd|t|dttu}|r|std|d|rd}t|tr|||
|t||_t}|d	kr||_||_dS)
Nz#TypeAliasType name must be a stringztype_params must be a tupleFzExpected a type param, got rznon-default type parameter 'z ' follows default type parameterTry)rrrr"	__value____type_params__rrrrrBrWrr!rrrr)	rrrrdefault_value_encounteredrrrrs	         rrzTypeAliasType.__init__sdC((
G EFFFk511
? =>>>"DN#.D (-%J)
2
2
":y/QRRR"*--	R$$P*$P$PQQQJ
yAAR-G[G#%F:%F%F%FGGG504-j,772%%j1111%%j1111"'
"3"3DiiG---") DMMMrrrNct|dr|dkr||t||dS)Nrr)r1_raise_attribute_errorrr)rrrrs   rrzTypeAliasType.__setattr__sStZ((
2T\-A-A++D111GGe,,,,,rc0||dSr)rrrs  r__delattr__zTypeAliasType.__delattr__s''-----rc|dkrtd|dvrtd|dtd|d)Nrzreadonly attribute>rrrzattribute 'z3' of 'typing.TypeAliasType' objects is not writablez0'typing.TypeAliasType' object has no attribute '')rrs  rrz$TypeAliasType._raise_attribute_errorsrz!!$%9:::KKK$&$&&&
%NtNNNrc|jSrrrs rrzTypeAliasType.__repr__rrrrc|durdS|dSt|trdkrfd|DStj|djdS)N.rcBg|]}|dzS)r_check_single_param)rgr	recursionrs  rrz5TypeAliasType._check_single_param.<locals>.<listcomp>!s=... #!44S)A+FF...r
Subscripting  requires a type.)rr9rrer)rrrs` `rrz!TypeAliasType._check_single_paramsC<<3=4eT**.yA~~.....',....)Ot}OOOrctjdkrtfd|DStfd|DS)Nrc3BK|]}|VdSrrrgrrs  rriz2TypeAliasType._check_parameters.<locals>.<genexpr>)sE,,T22rc3TK|]"}tj|djdV#dS)r r!N)rrerr$s  rriz2TypeAliasType._check_parameters.<locals>.<genexpr>-sY +NdmNNNr)rrr"rs` r_check_parameterszTypeAliasType._check_parameters's')) *!+
rc8|jstdt|ts|f}tjdkrt
j||St|}|	|}t||}|j|kr||_|S)Nz+Only generic type aliases are subscriptabler)rrrr"rrrrrr&r
r)rr	type_varsrs    rr
zTypeAliasType.__getitem__3s'
O MNNNj%00
+(]
7***4<<<*:66I//
;;J*4<<E#y00'0$Lrc|jSrrrs rrzTypeAliasType.__reduce__Drrc td)NzEtype 'typing_extensions.TypeAliasType' is not an acceptable base typerrs   rrzTypeAliasType.__init_subclass__GsW
rc td)NzType alias is not callablerrs rrzTypeAliasType.__call__Ns8999rrcVt|stStj||fSrrr*rry)rr[s  rrzTypeAliasType.__or__Ss+%U++*))|D%K00rcVt|stStj||fSrr-)rrZs  rrzTypeAliasType.__ror__Zs)$T***))|D$J//rr)rrrrrrrrrRrrrrrrr&r
rrrrrrrs@rrLrLs		6=?#	!#	!#	!#	!#	!#	!#	!J	-C	-	-d	-	-	-	-	-	-
	.C	.u	.	.	.	.	s	u					!c	!	!	!	!g%%




	
	
				"	!	!	!				:	:	:w&&
1
1
1
0
0
0
0
0
0
0'&&&rrLr>rc|t|to't|ddo|tuo
|tjuS)aZReturn True if the given type is a Protocol.

        Example::

            >>> from typing_extensions import Protocol, is_protocol
            >>> class P(Protocol):
            ...     def a(self) -> str: ...
            ...     b: int
            >>> is_protocol(P)
            True
            >>> is_protocol(int)
            False
        rF)rrrBrDrr]s rr>r>dsH
r4  
*NE22
*("
*&/)		
rct|st|dt|drt|jStt|S)aReturn the set of members defined in a Protocol.

        Example::

            >>> from typing_extensions import Protocol, get_protocol_members
            >>> class P(Protocol):
            ...     def a(self) -> str: ...
            ...     b: int
            >>> get_protocol_members(P) == frozenset({'a', 'b'})
            True

        Raise a TypeError for arguments that are not Protocols.
        z is not a Protocolr|)r>rr1r1r|rr]s rr;r;ysd2	9r7778882+,,	4R2333,R00111rr2cJeZdZdZdeddfdZdefdZdefdZde	de
fd	ZdS)
r2afDefine the documentation of a type annotation using ``Annotated``, to be
         used in class attributes, function and method parameters, return values,
         and variables.

        The value should be a positional-only string literal to allow static tools
        like editors and documentation generators to use it.

        This complements docstrings.

        The string value passed is available in the attribute ``documentation``.

        Example::

            >>> from typing_extensions import Annotated, Doc
            >>> def hi(to: Annotated[str, Doc("Who to say hi to")]) -> None: ...
        
documentationrNc||_dSrr2)rr2s  rrzDoc.__init__s!.Drcd|jdS)NzDoc()r4rs rrzDoc.__repr__s1$,1111rc*t|jSr)r0r2rs rr2zDoc.__hash__s*+++rrcZt|tstS|j|jkSr)rr2r*r2rs  rr.z
Doc.__eq__s+eS))
&%%%)<<<r)rrrrrrrrr2rrr.rrrr2r2s		 	/#	/T	/	/	/	/	2c	2	2	2	2	,c	,	,	,	,	=	=4	=	=	=	=	=	=rCapsuleTypeCAPI)r6r7ceZdZdZdZdZdZdS)r6rrrrIN)rrrr%VALUE_WITH_FAKE_GLOBALSr$r!rrrr6r6s#"#
rr6)rlocalseval_strr'ct|}|tjurtd|r|tjurtdt	|t
rt
|dd}|rCt|dr3|dd}t	|tj
rd}nd}d}t
|dd}|r3tj|d}	|	rt
|	dd}tt|}
|}nt	|tjrt
|dd}|j}d}
d}nft#|r't
|dd}t
|dd}d}
|}n0t|dr|j}dx}x}
}nt'|d	|iSt	|tst|d
|siS|s;|tjurd|DSt|S|S	t|d
r|j}t	|t.jr|j};	t|dr|j}||
pit
|ddx}rd|Dzfd|D}
|
S)aCompute the annotations dict for an object.

        obj may be a callable, class, or module.
        Passing in an object of any other type raises TypeError.

        Returns a dict.  get_annotations() returns a new dict every time
        it's called; calling it twice on the same object will return two
        different but equivalent dicts.

        This is a backport of `inspect.get_annotations`, which has been
        in the standard library since Python 3.10. See the standard library
        documentation for more:

            https://docs.python.org/3/library/inspect.html#inspect.get_annotations

        This backport adds the *format* argument introduced by PEP 649. The
        three formats supported are:
        * VALUE: the annotations are returned as-is. This is the default and
          it is compatible with the behavior on previous Python versions.
        * FORWARDREF: return annotations as-is if possible, but replace any
          undefined names with ForwardRef objects. The implementation proposed by
          PEP 649 relies on language changes that cannot be backported; the
          typing-extensions implementation simply returns the same result as VALUE.
        * STRING: return annotations as strings, in a format close to the original
          source. Again, this behavior cannot be replicated directly in a backport.
          As an approximation, typing-extensions retrieves the annotations under
          VALUE semantics and then stringifies them.

        The purpose of this backport is to allow users who would like to use
        FORWARDREF or STRING semantics once PEP 649 is implemented, but who also
        want to support earlier Python versions, to simply write:

            typing_extensions.get_annotations(obj, format=Format.FORWARDREF)

        z;The VALUE_WITH_FAKE_GLOBALS format is for internal use onlyz8eval_str=True is only supported with format=Format.VALUErNrrrr|z% is not a module, class, or callable.z+.__annotations__ is neither a dict nor Nonecli|]1\}}|t|tr|ntj|2Sr)rrrr)rgrrs   rrz#get_annotations.<locals>.<dictcomp>.sM"U*UC"8"8Vf>OPU>V>VrTr{rrci|]
}|j|Srr)rgrs  rrz#get_annotations.<locals>.<dictcomp>IsEEEeneEEErchi|].\}}|t|ts|nt|/Sr)rreval)rgrrrr=s   rrz#get_annotations.<locals>.<dictcomp>KsO,,,U#E3//QEET%&5Q5Q,,,r)r6r<rr%rrrBr1rrGetSetDescriptorTypermodulesr0varsrrrrrr!r"r{rpartialrGr|)rrr=r>r'obj_dictannobj_globalsmodule_namer
obj_localsunwraprreturn_values ``           rr7r7smJV333M
	Yfl22WXXXc4  $	MsJ55H
GHe44
ll#4d;;c6#>??CK!#|T::K
Dd;;D")&*d"C"CKd3iiJFF
V.
/
/	M#0$77C,KJFF
c]]	M#0$77C!#}d;;KJFF
S+
,
,	M%C044K4*vvsKKKLLL;I#t$$	TRRRSSS	I	&&&)iikk99
6=11#/Ffi&788#[Fv}--
1$0?!G>%2F
"#'8"===;	OEEEEENF,,,,,!iikk,,,rr3rrr=rc|jr|jSt|dd-	|jj}d|_||_|S#t
$rYnwxYw|t|dd}|Et|dd4ttj|j	ddd}|t|dd}|t|trGt|dd}|r3tj|d}|rt|dd}nLt|tj
rt|dd}n t|rt|dd}|i}|9i}t|tr"|t!|||t|dd}|t#|}|D]}|||j<
|j}	|	rgt+j|	sS|	|vr	||	}n^|	|vr	||	}nQt/t0|	rtt0|	St3|	|j}
t7|
||}d|_||_|S)	N__cell__T	__owner____forward_module__rr|rr)__forward_evaluated____forward_value__rBrQ
cell_contentsrrrErrSrrrrrr rFr0r__forward_arg__isidentifierkeyword	iskeywordr1builtins	NameError__forward_code__rC)forward_refrrr=rrrKrrrcodes           r_eval_with_ownerr`Us,	100;
D11=
#,:59105-



=Kd;;E
O%94@@L >EEzSWG?k=$??G?%&&	
>%e\4@@D [__[$??FD")&*d"C"CE6#455
>!%T::%
>!%==?G>F%&&
+

d5kk***5#4"%):DAAK
"7mmG$
0
0*/'')	0g&7&<&<	0f}}s3''
%x---nn$/Dw//E,0)(-%s=
A
	A
)rrr=rr'_recursive_guardc	|tjkr|jS|j|vr|S	t|||||}n##t$r|tjkr|cYSwxYwt
|trt|}t
|tr)t|ddd}t|||||||Stjdkr-|r+|rt|ni}|D]}|j|vr
|||j<tjdkr!tj|||||jhzStj||||||jhzS)aEvaluate a forward reference as a type hint.

        This is similar to calling the ForwardRef.evaluate() method,
        but unlike that method, evaluate_forward_ref() also:

        * Recursively evaluates forward references nested within the type hint.
        * Rejects certain objects that are not valid type hints.
        * Replaces type hints that evaluate to None with types.NoneType.
        * Supports the *FORWARDREF* and *STRING* formats.

        *forward_ref* must be an instance of ForwardRef. *owner*, if given,
        should be the object that holds the annotations that the forward reference
        derived from, such as a module, class object, or function. It is used to
        infer the namespaces to use for looking up names. *globals* and *locals*
        can also be explicitly given to provide the global and local namespaces.
        *type_params* is a tuple of type parameters that are in scope when
        evaluating the forward reference. This parameter must be provided (though
        it may be an empty tuple) if *owner* is not given and the forward reference
        does not already have an owner set. *format* specifies the format of the
        annotation and is a member of the annotationlib.Format enum.

        rOrSTN)rr=rrrar')rr)recursive_guard)r6r!rWr`r\r$rrr`rBr3rrr0rrr)	r^rrr=rr'rartvars	         rr3r3s@V]""..&*:::	$'EE			***""""		eS!!	&u%%EeZ((		u2D99E'(!1&
j(([(%+3T&\\\F#
1
1=..,0F4=)j(($ 0K4O3P P	
$ 0K4O3P P
s9AA)rrrr~ct|ttjtjfr#|jdkr|jS|jd|jS|durdSt|S)a"Convert a Python value to a format suitable for use with the STRING format.

        This is intended as a helper for tools that support the STRING format but do
        not have access to the code that originally produced the annotations. It uses
        repr() for most objects.

        r[r.rt)rrrFunctionTypeBuiltinFunctionTyperrr)rs rrQrQsnedF$79STUU	>:--))&==);===C<<5E{{r)"rYrZr[r\r]r^r_rardrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|ri)rrSrno_type_check_decoratorcdi|]-}tt||tt|.Sr)r1rrB)rgrs  rrr@s3TTTTgfd>S>STT764  TTTr)rr)r)NNF)NNr)r)rr[rcollections.abcrwenumrrrxrYrkrrrrrrr__all__PEP_560rGenericMetarar`r_FORWARD_REF_HAS_CLASSrrrr1rErFrJrrSrrrrrrrrr_Finalrrr	r5r1r=r@r%r'rrr4rFrBr4r.defaultdictrGr0rCrrrrrrrr rrrJrPrrrrbrQrSrxrtrqrrurr1EXCLUDED_ATTRIBUTESrrrDrrrrrrrcrIrHr'r%r$r#r&r"r(r)r*_NEEDS_SINGLETONMETArrWrrXr_PEP_764_IMPLEMENTEDr!rr?	signaturererr2rrrXrRrTr\r-r<rcryrtr9r8rKrrrrrr
rrr9rrr$r,rr/rrNrOrMr7r
rrRrUrVrTrGrrrErIrrrGrqr,r/rxryr\rCrr0rrrrrBrrrrrr_prohibitedrrrrrrrABCregister
memoryview	bytearrayrr:rArLrrr
r>r;rarr2_CapsuleType_socket_CAPIImportErrorr9r!r6r7IntEnumr%r3r`rQ
_typing_namesrr r+rrr<module>rs



				







wCCCL'+==063D3NN				
78Z  Z! HHW!W!W!W!W!W!W!W!r
(:

w




JJJ?FN3V^DV^Dv~f---6>*D999w	&	&	&	&	&4	&	&	&999999999?
(/(/(/(/(/6=(/(/(/(/\11111V01111
	wLEE
@76?##(MM0   z!!nGG	H	H	H	H	Hv34	H	H	H	H:::::-T::::<l 1222G(76?##?#H(M,OO10	+1488&&&P	7	7	7###{
		$
$
  
.?
{$
)))UUUUUUUUUUUUU==="*"*"*"*"*v:$"*"*"*"*HT

I$$!1	9/EI*)&YLN*))	
/$')	N/..	
"/$')	
,-JKX
",

)F677;;;			"wHH<<<<@@@BBB&b&b&b&b&b&V_--b&b&b&H[0(((((6>]((((.w0111j
w$K(M,O(M(M$K(MMh(htn72x \WWR22 \
YF
YFF$ 
\
\
\
\
\(#
\
\
\	$$$KGGFN,K,K(K76; II-
I
76>""&LL"""""]""""$#%%L
A0 I*N&LL 1 1&2D E E PPM*r.r.r.r.r.r.r.r.hnk2rBBJ<<<|!!!!!D!!!!2<
<
<
|-~>00076=!!$KK


 76:D1*NN0(>(>(>(>TT

I21212121nw"JHH0,76;8 II888%%%
)))CCCCCtCCC
'Y#Y#Y#Y#Y#Y,#Y#Y#Y#YN76?##;7(M,OO77777
777.77777*7770Z[       
WV[!!V[+[+[+[+[+[.+[+[+[+[+[bb[b[b[b[b[D-b[b[b[Lwv}%%b76?++
-
	5
	
	
	
	
	
	,
t3t3t3t3t34t3t3t3t3p &>'!!					v'Fd				,0777 w$KK66676;13 II,3,3,3`768+3
]FF&3&3&3T76:3HH.d33]3076?##8(MM88\8&7668;DD88\8"7678LEE88\8476:'3H$KK333&333"76:3HH333&'Xw
]F))))'''''34''''
@@@@@v+4@@@@<+++---w#######WV^$$fJHFHFHFHFHF!1HFHFHFHFHFVXJXJXJXJXJ}XJXJXJv76=!!$KK!(76233($*$H!!$'!76>""S&LLS%SuSSSS8w 4 # %$
SSSSS	S
S!,LVZ0&/#vz/2RRS


S*S
!a	 SSSSl76:&HH	FOCO$D	E	E	EB!b!!!!!L#",,,,W,,,,1AZ1O1O$JJ			BIIIIIIIIXg










(wv~&&YQ-44Q4Q4Q4Q4Qp Q Q QD+*F[D[[[[&$WWV^T%J%JKD76'((l9....`!3F6!6!6!p 9%8"w"JJ%+$6!!*+X+X+X!Y!YEEEEE$EEEN,,b"EEK%,????B"9J7;?H%%
_
#FF*OOJ
OOI
OOE76'((2@wnGG:1:1:1:1:1:1:1:1|w(MM7""							'!!,59
6

6

6

,
,(	6	6	6	6	6V%9	6	6	6	6_0_0_0_0_0_0_0_0D76=!!+2$K!6

D



*22V-=c-B2222*765 =
*CC========@wv}d33'..4;;L



KNN=!!!w555555555)-TE%|D76)**h!6#D4LLLLLb"VVVVVr)))'II(%%%
Pj  2333NN,---		TT]TTT
.


			s?uu&%u&
Back to Directory File Manager