B E_G@s ddlZddlZddlZddlZddlZddlmZddlZddlmZm Z m Z m Z ej dddkZ e rteZZnddlmZmZdZyddlmZmZmZWnek rdZYnXydd lmZdZWnek rdZYnXydd lmZWnek rd d ZYnXydd lmZmZWn2ek r^GdddZGdddZYnXddZddZeedrejZnddZeedrddlmZdZ ndZdZ ej dddkrddl!Z!e!j"Z#nddZ#ddd d!d"d#d$d%d&d'd(d)d*d+d,d-gZ$e p eZ%e r"e$&d.d/d0ge%r2e$'d1ej ddd2kZ(e(rZe$&d3d4d5geed6rnej)Z)nXeed7rGd8d9d9ej*dd:Z+e+dd:Z)n*Gd;d<dZ)e d?Z.e d@Z/e dAZ0ej dBddCZ1ej dDddCZ2ej dEddCZ3ej dFddGZ4eedr0ej5Z5nXeed7r^GdHdIdIej*dd:Z6e6dd:Z5n*GdJdKdKejZ7GdLddej-e7dd>Z5eedrej dddMkrej-Z-nej dddMkrGdNdOdOej8dd:Z9e9ddPdQZ-nXeed7rGdRdSdSej*dd:Z:e:dd:Z-n*GdTdUdUejZ;GdVddej-e;dd>Z-eed'rTejZ>nej dddMkrGdYdZdZej8dd:Z?e?d)d[dQZ>nXeed7rGd\d]d]ej*dd:Z@e@dd:Z>n*Gd^d_d_ejZAGd`d)d)ej-eAdd>Z>dadbZBdcd+ZCeed r,ejDZDn*ej dddedeZEGdfd d ejeEedgZDdhdiZFGdjdkdkeZGeFdlrGdmdldleje1eGejHdnZHeFdorGdpdodoeHe2eje1e4e2feGejIdnZIeFdqrGdrdqdqeje1eGejJdnZJeFdsrGdtdsdseJe1eGejKdnZKeed#r,ejLZLnLe rVGdud#d#ejMejNe.eGejMdnZLn"Gdvd#d#ejMejNe.eGejMdnZLeed!rejOZOnBeedwrGdxd!d!eje1eGejPdnZOnGdyd!d!eje1ZOeedzrejQZQe$'dznReed{r"Gd|dzdzeje1eGejRdnZQe$'dznej ddd}kr>eSd~eed$rRejTZTnTe rGdd$d$ejUejVe/e0feGejUdnZTn&Gdd$d$ejUejVe/e0feGejUdnZTeed"rejWZWnd2ej ddkrdkr.nnNe stXe dZYGdddejZZGdd"d"ejWej[e.e\feZejWdnZWnTe r\Gdd"d"ejWej[e.e\feGejWdnZWn&Gdd"d"ejWej[e.e\feGejWdnZWeedrej]Z]e$'dnjeed r e rGdddej]ejVe/e0feGej]dnZ]n&Gdddej]ejVe/e0feGej]dnZ]e$'deFd re rtddlmZmkZkmlZlGdddejmZhGdd3d3ehdZgeed5 rejnZnne( rdd5Zne( renZoeed& rejpZpne( renGdd&d&egZpej dddk rejqZqnTddZrddZsdes_tddddZudeu_tGdddeZvevd%ewfiZqexeq_ydeq_ieed1 r^ejzZzej{Z{ej|Z|npe rGdddejkdd:Z|Gdd1d1ZzddZ}ddd0Z{n2e% rddZ~GdddejZGdd1d1edZzej dddk rejZejZn"e rddlmkZkdd/Zdd.ZeedŃ r&ejZnej dddk r^GddDŽdej8dd:ZeddńZnej dddMk rGddDŽdej8dd:ZedddQZnheed7 rGdd̄dejZGdd΄dej*edd>Zedd:Zn&Gdd̄dejZGddńdedd>ZdS)N)GenericCallableTypeVarTuple)rr) GenericMeta TypingMetaF) _type_vars _next_in_mro _type_checkT) _subs_tree) _tp_cachecCs|S)N)xrrB/opt/alt/python37/lib/python3.7/site-packages/typing_extensions.pyr$sr)_TypingEllipsis _TypingEmptyc@s eZdZdS)rN)__name__ __module__ __qualname__rrrrr)src@s eZdZdS)rN)rrrrrrrr,srcCs2t|}d|kr.x|dD]}||dqW|S)N __slots__)dictpop)dctZ dict_copyZslotrrr_no_slots_copy4s rcCsX|jstdt|t|}t|j}||krTtd||kr@dndt|||fdS)Nz%s is not a generic classz0Too %s parameters for %s; actual %s, expected %smanyfew)__parameters__ TypeErrorreprlen)cls parametersalenelenrrr_check_generic<s r& _generic_newcOs|j|f||S)N)__new__)Zbase_clsr"argskwargsrrrr'Vs_geqv)r+)rcGsH|j}x<|D]4}x.|D]"}||jkr|j|dkr6tSPqWtSq WdS)NT)__mro____dict__NotImplemented)CmethodsmromethodBrrr_check_methods_in_mroes   r6ClassVarFinalTypeContextManagerCounterDeque DefaultDict TypedDict SupportsIndexfinalIntVarLiteralNewTypeoverloadText TYPE_CHECKINGget_args get_originget_type_hints Annotated)rrProtocolruntimeruntime_checkableNoReturn_FinalTypingBasec@s$eZdZdZdZddZddZdS) _NoReturna7Special type indicating functions that never return. Example:: from typing import NoReturn def stop() -> NoReturn: raise Exception('no way') This type is invalid in other positions, e.g., ``List[NoReturn]`` will fail in static type checkers. rcCs tddS)Nz*NoReturn cannot be used with isinstance().)r)selfobjrrr__instancecheck__sz_NoReturn.__instancecheck__cCs tddS)Nz*NoReturn cannot be used with issubclass().)r)rRr"rrr__subclasscheck__sz_NoReturn.__subclasscheck__N)rrr__doc__rrTrUrrrrrQs rQ)_rootcs2eZdZdZd fdd ZddZddZZS) _NoReturnMetazMetaclass for NoReturnFcstj|||||dS)N)rW)superr()r"namebases namespacerW) __class__rrr(sz_NoReturnMeta.__new__cCs tddS)Nz*NoReturn cannot be used with isinstance().)r)rRrSrrrrTsz_NoReturnMeta.__instancecheck__cCs tddS)Nz*NoReturn cannot be used with issubclass().)r)rRr"rrrrUsz_NoReturnMeta.__subclasscheck__)F)rrrrVr(rTrU __classcell__rr)r]rrXsrXc@seZdZdZdZdS)rOa7Special type indicating functions that never return. Example:: from typing import NoReturn def stop() -> NoReturn: raise Exception('no way') This type is invalid in other positions, e.g., ``List[NoReturn]`` will fail in static type checkers. rN)rrrrVrrrrrrOs ) metaclassrWTKTVTT_co) covariantV_coVT_coT_contra) contravariantcsNeZdZdZdZdddZddZdd Zfd d Zd d Z ddZ Z S) _ClassVara[Special type construct to mark class variables. An annotation wrapped in ClassVar indicates that a given attribute is intended to be used as a class variable and should not be set on instances of that class. Usage:: class Starship: stats: ClassVar[Dict[str, int]] = {} # class variable damage: int = 10 # instance variable ClassVar accepts only types and cannot be further subscribed. Note that ClassVar is not a class itself, and should not be used with isinstance() or issubclass(). )__type__NcKs ||_dS)N)rj)rRtpkwdsrrr__init__sz_ClassVar.__init__c CsRt|}|jdkr6|t|d|jddddStd|jdddS)Nz{} accepts only single type.T)rWz {} cannot be further subscripted)typerjtypingr formatrr)rRitemr"rrr __getitem__s z_ClassVar.__getitem__cCs.t|j||}||jkr|St||ddS)NT)rW)rp _eval_typerjro)rRglobalnslocalnsnew_tprrrrt s z_ClassVar._eval_typecs.t}|jdk r*|dt|j7}|S)Nz[{}])rY__repr__rjrqrp _type_repr)rRr)r]rrrxs  z_ClassVar.__repr__cCstt|j|jfS)N)hashrorrj)rRrrr__hash__sz_ClassVar.__hash__cCs,t|tstS|jdk r$|j|jkS||kS)N) isinstancerir0rj)rRotherrrr__eq__s    z_ClassVar.__eq__)N) rrrrVrrmrsrtrxr|rr^rr)r]rris   rics^eZdZdZdfdd ZddZdd Zd d Zd d ZfddZ ddZ ddZ Z S) _ClassVarMetazMetaclass for ClassVarNFcs(tj|||||d}|dk r$||_|S)N)rW)rYr(rj)r"rZr[r\rkrWrR)r]rrr(%sz_ClassVarMeta.__new__cCs tddS)Nz*ClassVar cannot be used with isinstance().)r)rRrSrrrrT+sz_ClassVarMeta.__instancecheck__cCs tddS)Nz*ClassVar cannot be used with issubclass().)r)rRr"rrrrU.sz_ClassVarMeta.__subclasscheck__cCsbt|}|jdk r*td|jddt|d|jdd}||j|jt|j |ddS)Nz {} cannot be further subscriptedrnz{} accepts only single type.T)rkrW) rorjrrqrrpr __bases__rr/)rRrrr"paramrrrrs1s  z_ClassVarMeta.__getitem__cCs@t|j||}||jkr|St||j|jt|j|jddS)NT)rkrW)rprtrjrorrrr/)rRrurvrwrrrrt=s   z_ClassVarMeta._eval_typecs.t}|jdk r*|dt|j7}|S)Nz[{}])rYrxrjrqrpry)rRrz)r]rrrxEs  z_ClassVarMeta.__repr__cCstt|j|jfS)N)r{rorrj)rRrrrr|Ksz_ClassVarMeta.__hash__cCs,t|tstS|jdk r$|j|jkS||kS)N)r}r7r0rj)rRr~rrrrNs    z_ClassVarMeta.__eq__)NF) rrrrVr(rTrUrsrtrxr|rr^rr)r]rr"s  rc@seZdZdZdZdS)r7a[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(). N)rrrrVrjrrrrr7Us)rrc@seZdZddZddZdS) _FinalFormcCs d|jS)Nztyping_extensions.)_name)rRrrrrxnsz_FinalForm.__repr__cCs t|d|j}t||fS)Nz{} accepts only single type)rpr rqr _GenericAlias)rRr#rrrrrrsqsz_FinalForm.__getitem__N)rrrrxrsrrrrrlsraWA special typing construct to indicate that a 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.)doccsNeZdZdZdZdddZddZdd Zfd d Zd d Z ddZ Z S)_FinalaA special typing construct to indicate that a 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. )rjNcKs ||_dS)N)rj)rRrkrlrrrrmsz_Final.__init__c CsRt|}|jdkr6|t|d|jddddStd|jdddS)Nz{} accepts only single type.rnT)rWz {} cannot be further subscripted)rorjrpr rqrr)rRrrr"rrrrss z_Final.__getitem__cCs.t|j||}||jkr|St||ddS)NT)rW)rprtrjro)rRrurvrwrrrrts z_Final._eval_typecs.t}|jdk r*|dt|j7}|S)Nz[{}])rYrxrjrqrpry)rRrz)r]rrrxs  z_Final.__repr__cCstt|j|jfS)N)r{rorrj)rRrrrr|sz_Final.__hash__cCs,t|tstS|jdk r$|j|jkS||kS)N)r}rr0rj)rRr~rrrrs    z _Final.__eq__)N) rrrrVrrmrsrtrxr|rr^rr)r]rrs   rcs^eZdZdZdfdd ZddZdd Zd d Zd d ZfddZ ddZ ddZ Z S) _FinalMetazMetaclass for FinalNFcs(tj|||||d}|dk r$||_|S)N)rW)rYr(rj)r"rZr[r\rkrWrR)r]rrr(sz_FinalMeta.__new__cCs tddS)Nz'Final cannot be used with isinstance().)r)rRrSrrrrTsz_FinalMeta.__instancecheck__cCs tddS)Nz'Final cannot be used with issubclass().)r)rRr"rrrrUsz_FinalMeta.__subclasscheck__cCsbt|}|jdk r*td|jddt|d|jdd}||j|jt|j |ddS)Nz {} cannot be further subscriptedrnz{} accepts only single type.T)rkrW) rorjrrqrrpr rrr/)rRrrr"rrrrrss  z_FinalMeta.__getitem__cCs@t|j||}||jkr|St||j|jt|j|jddS)NT)rkrW)rprtrjrorrrr/)rRrurvrwrrrrts   z_FinalMeta._eval_typecs.t}|jdk r*|dt|j7}|S)Nz[{}])rYrxrjrqrpry)rRrz)r]rrrxs  z_FinalMeta.__repr__cCstt|j|jfS)N)r{rorrj)rRrrrr|sz_FinalMeta.__hash__cCs,t|tstS|jdk r$|j|jkS||kS)N)r}r8r0rj)rRr~rrrrs    z_FinalMeta.__eq__)NF) rrrrVr(rTrUrsrtrxr|rr^rr)r]rrs  rc@seZdZdZdZdS)r8aA special typing construct to indicate that a 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. N)rrrrVrjrrrrr8scCs|S)auThis 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. r)frrrr@scCst|S)N)r)rZrrrrAsc@seZdZddZddZdS) _LiteralFormcCs d|jS)Nztyping_extensions.)r)rRrrrrx$sz_LiteralForm.__repr__cCs t||S)N)r)rRr#rrrrs'sz_LiteralForm.__getitem__N)rrrrxrsrrrrr"sraoA 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.csNeZdZdZdZdddZddZdd Zfd d Zd d Z ddZ Z S)_LiteralaA 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. ) __values__NcKs ||_dS)N)r)rRvaluesrlrrrrmHsz_Literal.__init__cCsJt|}|jdkr.t|ts"|f}||ddStd|jdddS)NT)rWz {} cannot be further subscriptedrn)rorr}tuplerrqr)rRrr"rrrrsKs   z_Literal.__getitem__cCs|S)Nr)rRrurvrrrrtTsz_Literal._eval_typecs6t}|jdk r2|ddttj|j7}|S)Nz[{}]z, )rYrxrrqjoinmaprpry)rRrz)r]rrrxWs  z_Literal.__repr__cCstt|j|jfS)N)r{rorr)rRrrrr|]sz_Literal.__hash__cCs,t|tstS|jdk r$|j|jkS||kS)N)r}rr0r)rRr~rrrr`s    z_Literal.__eq__)N) rrrrVrrmrsrtrxr|rr^rr)r]rr8s    rcs^eZdZdZdfdd ZddZdd Zd d Zd d ZfddZ ddZ ddZ Z S) _LiteralMetazMetaclass for LiteralNFcs(tj|||||d}|dk r$||_|S)N)rW)rYr(r)r"rZr[r\rrWrR)r]rrr(lsz_LiteralMeta.__new__cCs tddS)Nz)Literal cannot be used with isinstance().)r)rRrSrrrrTrsz_LiteralMeta.__instancecheck__cCs tddS)Nz)Literal cannot be used with issubclass().)r)rRr"rrrrUusz_LiteralMeta.__subclasscheck__cCsVt|}|jdk r*td|jddt|ts:|f}||j|jt|j |ddS)Nz {} cannot be further subscriptedrnT)rrW) rorrrqrr}rrrr/)rRrrr"rrrrsxs   z_LiteralMeta.__getitem__cCs|S)Nr)rRrurvrrrrtsz_LiteralMeta._eval_typecs6t}|jdk r2|ddttj|j7}|S)Nz[{}]z, )rYrxrrqrrrpry)rRrz)r]rrrxs  z_LiteralMeta.__repr__cCstt|j|jfS)N)r{rorr)rRrrrr|sz_LiteralMeta.__hash__cCs,t|tstS|jdk r$|j|jkS||kS)N)r}rBr0r)rRr~rrrrs    z_LiteralMeta.__eq__)NF) rrrrVr(rTrUrsrtrxr|rr^rr)r]rris  rc@seZdZdZdZdS)rBaA 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. N)rrrrVrrrrrrBs cOs tddS)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.N)NotImplementedError)r)rlrrr_overload_dummysrcCstS)a Decorator for overloaded functions/methods. In a stub file, place two or more stub definitions for the same function in a row, each decorated with @overload. For example: @overload def utf8(value: None) -> None: ... @overload def utf8(value: bytes) -> bytes: ... @overload def utf8(value: str) -> bytes: ... In a non-stub file (i.e. a regular .py file), do the same but follow it with an implementation. The implementation should *not* be decorated with @overload. For example: @overload def utf8(value: None) -> None: ... @overload def utf8(value: bytes) -> bytes: ... @overload def utf8(value: str) -> bytes: ... def utf8(value): # implementation goes here )r)funcrrrrDsCT_co)rdboundc@seZdZdZdZdS)r9aA special construct usable to annotate class objects. For example, suppose we have the following classes:: class User: ... # Abstract base for User classes class BasicUser(User): ... class ProUser(User): ... class TeamUser(User): ... And a function that takes a class argument that's a subclass of User and returns an instance of the corresponding class:: U = TypeVar('U', bound=User) def new_user(user_class: Type[U]) -> U: user = user_class() # (Here we could write the user object to a database) return user joe = new_user(BasicUser) At this point the type checker knows that joe has type BasicUser. rN)rrrrVrrrrrr9s)extracCsHtt|r(t|tt|t|<dStt|r@t|dSdSdS)z Returns True if the given type isn't defined in typing but is defined in collections_abc. Adds the type to __all__ if the collection is found in either typing or collection_abc. FTN)hasattrrp__all__appendgetattrglobalscollections_abc)Z type_namerrr _define_guards    rcseZdZfddZZS)_ExtensionsGenericMetacstjdddks$tjdddkrN|jdk rNtdjddkrJtdd S|js`t|S|j |}|t k rx|S|j|j krd Sx,|j D]}t |trqt||rd SqWd S) a*This mimics a more modern GenericMeta.__subclasscheck__() logic (that does not have problems with recursion) to work around interactions between collections, typing, and typing_extensions on older versions of Python, see https://github.com/python/typing/issues/501. Nr)rrKr)rrKrrnr)abc functoolszCParameterized generics cannot be used with class or instance checksFT)sys version_info __origin__ _getframe f_globalsr __extra__rYrU__subclasshook__r0r.__subclasses__r}r issubclass)rRsubclassresZscls)r]rrrUs$$      z(_ExtensionsGenericMeta.__subclasscheck__)rrrrUr^rr)r]rrsr Awaitablec@seZdZdZdS)rrN)rrrrrrrrr!s)r_r Coroutinec@seZdZdZdS)rrN)rrrrrrrrr's AsyncIterablec@seZdZdZdS)rrN)rrrrrrrrr.s AsyncIteratorc@seZdZdZdS)rrN)rrrrrrrrr5sc@seZdZdZddZdS)r<rcOs*t|trtj||Sttj|f||S)N)r+r< collectionsdequer')r"r)rlrrrr(Cs  z Deque.__new__N)rrrrr(rrrrr<>sc@seZdZdZddZdS)r<rcOs*|jtkrtj||Sttj|f||S)N)_gorgr<rrr')r"r)rlrrrr(Ms  z Deque.__new__N)rrrrr(rrrrr<HsAbstractContextManagerc@seZdZdZdS)r:rN)rrrrrrrrr:Vsc@s2eZdZdZddZejddZeddZ dS) r:rcCs|S)Nr)rRrrr __enter__^szContextManager.__enter__cCsdS)Nr)rRexc_type exc_value tracebackrrr__exit__aszContextManager.__exit__cCs8|tkr4tdd|jDr4tdd|jDr4dStS)Ncss|]}d|jkVqdS)rN)r/).0r5rrr msz2ContextManager.__subclasshook__..css|]}d|jkVqdS)rN)r/)rr5rrrrnsT)r:anyr.r0)r"r1rrrres zContextManager.__subclasshook__N) rrrrrrabstractmethodr classmethodrrrrrr:[sAsyncContextManagerAbstractAsyncContextManagerc@seZdZdZdS)rrN)rrrrrrrrrws)rrKa class AsyncContextManager(typing.Generic[T_co]): __slots__ = () async def __aenter__(self): return self @abc.abstractmethod async def __aexit__(self, exc_type, exc_value, traceback): return None @classmethod def __subclasshook__(cls, C): if cls is AsyncContextManager: return _check_methods_in_mro(C, "__aenter__", "__aexit__") return NotImplemented __all__.append('AsyncContextManager') c@seZdZdZddZdS)r=rcOs*t|trtj||Sttj|f||S)N)r+r=r defaultdictr')r"r)rlrrrr(s  zDefaultDict.__new__N)rrrrr(rrrrr=sc@seZdZdZddZdS)r=rcOs*|jtkrtj||Sttj|f||S)N)rr=rrr')r"r)rlrrrr(s  zDefaultDict.__new__N)rrrrr(rrrrr=s)rrKrn_TIntcs eZdZdZfddZZS) _CounterMetazMetaclass for Countercst|tfS)N)rYrsint)rRrr)r]rrrssz_CounterMeta.__getitem__)rrrrVrsr^rr)r]rrsrc@seZdZdZddZdS)r;rcOs*t|trtj||Sttj|f||S)N)r+r;rr')r"r)rlrrrr(s  zCounter.__new__N)rrrrr(rrrrr;sc@seZdZdZddZdS)r;rcOs*t|trtj||Sttj|f||S)N)r+r;rr')r"r)rlrrrr(s  zCounter.__new__N)rrrrr(rrrrr;sc@seZdZdZddZdS)r;rcOs*|jtkrtj||Sttj|f||S)N)rr;rr')r"r)rlrrrr(s  zCounter.__new__N)rrrrr(rrrrr;sChainMapc@seZdZdZddZdS)rrcOs*t|trtj||Sttj|f||S)N)r+rrr')r"r)rlrrrr(s  zChainMap.__new__N)rrrrr(rrrrrsc@seZdZdZddZdS)rrcOs*|jtkrtj||Sttj|f||S)N)rrrr')r"r)rlrrrr(s  zChainMap.__new__N)rrrrr(rrrrrsAsyncGeneratorc@seZdZdZdS)rrN)rrrrrrrrrscCsdd}||_||_|S)aQNewType creates simple unique types with almost zero runtime overhead. NewType(name, tp) is considered a subtype of tp by static type checkers. At runtime, NewType(name, tp) returns a dummy function that simply returns its argument. Usage:: UserId = NewType('UserId', int) def name_by_id(user_id: UserId) -> str: ... UserId('user') # Fails type check name_by_id(42) # Fails type check name_by_id(UserId(42)) # OK num = UserId(5) + 1 # type: int cSs|S)Nr)rrrrnew_typeszNewType..new_type)r __supertype__)rZrkrrrrrCscCs8t|tstt|dr|jSx|jdk r2|j}q W|S)z@This function exists for compatibility with old typing versions.rN)r}rAssertionErrorrrr)r"rrrr.s    rcCsLt}xBt|jddD],\}}t|trt|tkr|j|d}qW|S)z@This function exists for compatibility with old typing versions.Nrn)object enumerater.r}rrr)r"Z next_in_mroicrrrr 9s r rIterableIteratorHashableSized Container Collection ReversiblecCszt}xn|jddD]\}|jdkr&qt|di}x>t|jt|D] }|dsN|dkrN||qNWqW|S)Nr)rLr__annotations___abc_)__abstractmethods__r __weakref__ _is_protocol_is_runtime_protocolr/__args__r__next_in_mro__rr__orig_bases__r __tree_hash__rVrrmr(r_MutableMapping__markerr) setr.rrlistr/keys startswithadd)r"attrsbase annotationsattrrrr_get_protocol_attrsHs    rcstfddtDS)Nc3s|]}tt|dVqdS)N)callabler)rr)r"rrr\sz,_is_callable_members_only..)allr)r"r)r"r_is_callable_members_only[srcsZeZdZdZesd fdd ZfddZfddZfd d ZesRe d d Z Z S) _ProtocolMetazInternal metaclass for Protocol. This exists so Protocol classes can be generic without deriving from Generic. Nc sL|dks t|dk r<|dk s ttdd|Ds:t|nt|}d} xJ|D]B} | tkrbtdt| trN| jttfkrN| dk rtd| j } qNW| dkr|} njt |} t | | kstdd fdd|Dt dd|Drd nd d d d| Df| }|} |dk r>t |tjkr>||kr>|f|}td d|D}t d d|Drvtdd|D}|||dtt|j||||dd} tt| d|s| nt||| _ |rtdd|Dnd| _t| | _|dkr| | _n|dk r|j| _|j| _t| drH|r8t| n tt| | _ | S)Ncss|]}t|tVqdS)N)r}r)rtrrrrpsz(_ProtocolMeta.__new__..z!Cannot inherit from plain GenericzACannot inherit from Generic[...] or Protocol[...] multiple times.z1Some type variables (%s) are not listed in %s[%s]z, c3s|]}|krt|VqdS)N)str)rr)gvarsetrrrscss|]}|jtkVqdS)N)rr)rbrrrrsrrLcss|]}t|VqdS)N)r)rgrrrrscss$|]}t|trt|n|VqdS)N)r}rr)rrrrrrscss |]}t|to|tk VqdS)N)r}rr)rrrrrrscss|]}|tk r|VqdS)N)r)rrrrrrs)rrT)rWrcss*|]"}|tkrdn|tkrdn|VqdS).rN)rr)rarrrrsr )!rrr rrr}rrrLrrrrrorABCMetarupdaterYr( __setattr__rrr rr _abc_registry _abc_cacherr{r r|r)r"rZr[r\tvarsr)originr orig_basesgvarsrtvarsetZ initial_basesrR)r])rrr(isj                z_ProtocolMeta.__new__cstj||jdds2tddjD_jrxfjddD]T}|tt fksH|j dkrl|j t ksHt |tr||jsHt |tr|jt ksHtd|qHWdd}|_fd d }d jkr|_dS) Nrcss*|]"}|tkp t|to |jtkVqdS)N)rLr}rr)rrrrrrsz)_ProtocolMeta.__init__..rnzcollections.abcz7Protocols can only inherit from other protocols, got %rc_st|jrtddS)Nz Protocols cannot be instantiated)rorr)rRr)r*rrr_no_inits z(_ProtocolMeta.__init__.._no_initcsjddstSt|ts$tdxttD]h}xb|jD]T}||jkr\|j|dkrZtSPt|di}t|t j r:||kr:t|t r:|j r:Pq:WtSq.WdS)Nrz"issubclass() arg 1 must be a classrT) r/getr0r}rorrr.rrpMappingrr)r~rrr)r"rr _proto_hooks$      z+_ProtocolMeta.__init__.._proto_hookr)rYrmr/rrrrr.rrrr_PROTO_WHITELISTr}r rrrr)r"r)r*rrr)r])r"rrms&        z_ProtocolMeta.__init__csZtddrtr$tjr$dSjrJtfddtDrJdStt S)NrFTc3s8|]0}t|o.tt|d p.t|dk VqdS)N)rrr)rr)instancerRrrrsz2_ProtocolMeta.__instancecheck__..) rrrr]rrrrYrrT)rRr)r])rrRrrTs  z_ProtocolMeta.__instancecheck__cs|jdk r*tdjddkr&tddS|jddrf|jddsftdjddkr^dStd |jddrt|stdjddkrtt | |Std tt | |S) Nrnr)rrzCParameterized generics cannot be used with class or instance checksFrr)rrrpzBInstance and class checks can only be used with @runtime protocolsz.css|]}t|tVqdS)N)r}r)rrrrrr sz0Parameters to %r[...] must all be type variablesz(Parameters to %r[...] must all be uniquez'Cannot subscript already-subscripted %sr)rr)rrr)r}rrrrrrrLrr!rrr rr r&r]rrrr/rr)rRparamsrr)prependr)rrrssD       z_ProtocolMeta.__getitem__)NNNNN) rrrrV OLD_GENERICSr(rmrTrUrrsr^rr)r]rrbs@ /  rc@s eZdZdZdZdZddZdS)rLaBase 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_extensions.runtime act as simple-minded runtime protocol that checks only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto({bases}): def meth(self) -> T: ... rTcOsBt|tkrtdtr.tt||f||St|j|f||S)NzIType Protocol cannot be instantiated; it can be used only as a base class)rrLrr r'r r)r"r)rlrrrr(Js  zProtocol.__new__N)rrrrVrrr(rrrrrL*s)r_zProtocol, Generic[T]z Protocol[T])r[)r r_collect_type_varscseZdZfddZZS)rcsVtddrtr$tjr$dSjrJtfddtDrJdStS)NrFTc3s8|]0}t|o.tt|d p.t|dk VqdS)N)rrr)rr)r"rrrrdsz2_ProtocolMeta.__instancecheck__..) rrrr]rrrrYrT)r"r)r])r"rrrT\s  z_ProtocolMeta.__instancecheck__)rrrrTr^rr)r]rrYscs<eZdZdZdZdZfddZeddZdd Z Z S) rLaBase 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_extensions.runtime act as simple-minded runtime protocol that checks only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto(Protocol[T]): def meth(self) -> T: ... rTcs|tkrtdt|S)NzIType Protocol cannot be instantiated; it can only be used as a base class)rLrrYr()r"r)rl)r]rrr(szProtocol.__new__cst|ts|f}|s,|tk r,td|jdtfdd|D}|tkrtdd|Dsd}xt||tr~|d7}qfWtd|d||t t |t |krtd n t ||t ||S) Nz)Parameter list to {}[...] cannot be emptyz*Parameters to generic types must be types.c3s|]}t|VqdS)N)r )rr)rrrrsz-Protocol.__class_getitem__..css|]}t|tVqdS)N)r}r)rrrrrrsrrnzJParameters to Protocol[...] must all be type variables. Parameter {} is {}z.Parameters to Protocol[...] must all be unique) r}rrrrqrrLrrr!rr&r)r"rrr)rr__class_getitem__s(    zProtocol.__class_getitem__c sg}djkrtjk}n tjk}|r0tddjkrtj}d}xNjD]D}t|trR|jtt fkrR|jtkr|dnd}|dk rtd|j }qRW|dkr|}nZt |}t ||ksd fdd|D} d d d|D} td | || |}t|_ jd ds2td djD_fd d} djkrP| _js\dSxVjD]L}|ttfksd|jdkr|jtksdt|tr|jsdtd|qdWdd} | _dS)Nrz!Cannot inherit from plain GenericrrLzECannot inherit from Generic[...] and/or Protocol[...] multiple types.z, c3s|]}|krt|VqdS)N)r)rr)rrrrsz-Protocol.__init_subclass__..css|]}t|VqdS)N)r)rrrrrrsz1Some type variables ({}) are not listed in {}[{}]rcss|]}|tkVqdS)N)rL)rrrrrrscsjddstStdds>tdjddkr6tStdtsftdjddkr^tStdt |t sxtd xtt D]h}xb|j D]T}||jkr|j|dkrtSPt|d i}t |t jr||krt |tr|jrPqWtSqWd S) NrrFr,r)rrzBInstance and class checks can only be used with @runtime protocolsz._proto_hookrzcollections.abcz7Protocols can only inherit from other protocols, got %rc_st|jrtddS)Nz Protocols cannot be instantiated)rorr)rRr)r*rrrr s z,Protocol.__init_subclass__.._no_init)r/rrrrr r}rrrLrrrrqrrrrrrrrrrrm) r"r)r*rerrorrrZthe_basers_varss_argsrrr)r"rr__init_subclass__sZ               zProtocol.__init_subclass__) rrrrVrrr(rr rr^rr)r]rrLks   cCs&t|tr|jstd|d|_|S)a4Mark a protocol class as a runtime protocol, so that it 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 the one-offs in collections.abc such as Hashable. zB@runtime_checkable can be only applied to protocol classes, got %rT)r}rrrr)r"rrrrNs c@s$eZdZdZejedddZdS)r?r)returncCsdS)Nr)rRrrr __index__.szSupportsIndex.__index__N)rrrrrrrrrrrrr?*s)r c Cs>y tdjddkrtdWnttfk r8YnXdS)Nrnr)rrrpz4TypedDict does not support instance and class checksF)rrrrAttributeError ValueError)r"r~rrr _check_fails8s  rcOs,|s td|d|dd}}t||S)Nz)TypedDict.__new__(): not enough argumentsrrn)rr)r)r*_rrr _dict_newCsrz,($cls, _typename, _fields=None, /, **kwargs))totalc OsX|s td|d|dd}}|r>|d|dd}}n4d|krj|d}ddl}|jdtddntd|ry |\}Wqtk rtd t|dYqXnr(rz?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typecsi|]\}}t||qSr)rpr )rnrk)rrr sz*_TypedDictMeta.__new__..__required_keys__r__optional_keys__r)r$rrYr r(rrrritemsrr/r frozensetr'r(rr) r"rZr[r#rZtp_dictrZown_annotationsZown_annotation_keysZ required_keysZ optional_keysr)r])rrr({s0           z_TypedDictMeta.__new__)T)rrrr(rrTrUr^rr)r]rr zs&r aA simple typed name space. At runtime it is equivalent to a plain dict. TypedDict creates a dictionary type that expects all of its instances to have a certain set of keys, with each key associated with a value of a consistent type. This expectation is not checked at runtime but is only enforced by type checkers. Usage:: class Point2D(TypedDict): x: int y: int label: str a: Point2D = {'x': 1, 'y': 2, 'label': 'good'} # OK b: Point2D = {'z': 3, 'label': 'bad'} # Fails type check assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first') The type info can be accessed via the Point2D.__annotations__ dict, and the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets. TypedDict supports two additional equivalent forms:: Point2D = TypedDict('Point2D', x=int, y=int, label=str) Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str}) The class syntax is only supported in Python 3.6+, while two other syntax forms work for Python 2.7 and 3.2+ csHeZdZdZfddZddZddZdd Zd d Zd d Z Z S)_AnnotatedAliasaKRuntime representation of an annotated type. At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't' with extra annotations. The alias behaves like a normal typing alias, instantiating is the same as instantiating the underlying type, binding it to types is also the same. cs2t|tr|j|}|j}t||||_dS)N)r}r+ __metadata__rrYrm)rRrmetadata)r]rrrms   z_AnnotatedAlias.__init__cCs$t|dkst|d}t||jS)Nrnr)r!rr+r,)rRrrrrr copy_withsz_AnnotatedAlias.copy_withcCs&dt|jddd|jDS)Nz#typing_extensions.Annotated[{}, {}]z, css|]}t|VqdS)N)r )rrrrrrsz+_AnnotatedAlias.__repr__..)rqrpryrrr,)rRrrrrxs z_AnnotatedAlias.__repr__cCstjt|jf|jffS)N)operatorgetitemrJrr,)rRrrr __reduce__sz_AnnotatedAlias.__reduce__cCs*t|tstS|j|jkrdS|j|jkS)NF)r}r+r0rr,)rRr~rrrrs   z_AnnotatedAlias.__eq__cCst|j|jfS)N)r{rr,)rRrrrr|sz_AnnotatedAlias.__hash__) rrrrVrmr.rxr1rr|r^rr)r]rr+s r+c@s0eZdZdZdZddZeddZddZd S) rJaAdd 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 (and will be in the __origin__ field), the remaining arguments are kept as a tuple in the __extra__ field. Details: - It's an error to call `Annotated` with less than two arguments. - Nested Annotated are flattened:: Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3] - Instantiating an annotated type is equivalent to instantiating the underlying type:: Annotated[C, Ann1](5) == C(5) - Annotated can be used as a generic type alias:: Optimized = Annotated[T, runtime.Optimize()] Optimized[int] == Annotated[int, runtime.Optimize()] OptimizedList = Annotated[List[T], runtime.Optimize()] OptimizedList[int] == Annotated[List[int], runtime.Optimize()] rcOs tddS)Nz&Type Annotated cannot be instantiated.)r)r"r)r*rrrr(szAnnotated.__new__cCsLt|trt|dkrtdd}t|d|}t|dd}t||S)Nr,zUAnnotated[...] should be used with at least two arguments (a type and an annotation).z$Annotated[t, ...]: t must be a type.rrn)r}rr!rrpr r+)r"rrrr-rrrr s zAnnotated.__class_getitem__cOstd|jdS)NzCannot subclass {}.Annotated)rrqr)r"r)r*rrrr&szAnnotated.__init_subclass__N) rrrrVrr(rr rrrrrrJs  cCs\t|trt|jSt|tjrXtdd|jD}||jkrB|S||}|j |_ |S|S)z2Strips the annotations from a given type. css|]}t|VqdS)N)_strip_annotations)rrrrrr1sz%_strip_annotations..) r}r+r2rrprrrr._special)rZ stripped_argsrrrrr2+s     r2cCs*tj|||d}|r|Sdd|DS)a]Return type hints for an object. This is often the same as obj.__annotations__, but it handles forward references encoded as string literals, adds Optional[t] if a default value equal to None is set and recursively replaces all 'Annotated[T, ...]' with 'T' (unless 'include_extras=True'). The argument may be a module, class, method, or function. The annotations are returned as a dictionary. For classes, annotations include also inherited members. TypeError is raised if the argument is not of a type that can contain annotations, and an empty dictionary is returned if no annotations are present. BEWARE -- the behavior of globalns and localns is counterintuitive (unless you are familiar with how eval() and exec() work). The search order is locals first, then globals. - If no dict arguments are passed, an attempt is made to use the globals from obj (or the respective module's globals for classes), and these are also used as the locals. If the object does not appear to have globals, an empty dictionary is used. - If one dict argument is passed, it is used for both globals and locals. - If two dict arguments are passed, they specify globals and locals, respectively. )rurvcSsi|]\}}t||qSr)r2)rkrrrrr&[sz"get_type_hints..)rprIr))rSrurvZinclude_extrashintrrrrI9scCs t|dko|do|dS)z3Returns True if name is a __dunder_variable_name__.__)r!rendswith)rZrrr _is_dunder_sr9cseZdZdZfddZeddZddZdfd d Zd d Z e fd dZ ddZ ddZ fddZddZddZZS) AnnotatedMetazMetaclass for Annotatedc s8tdd|Dr"tdtttj||||f|S)Ncss|]}|tk VqdS)N)r)rrrrrrksz(AnnotatedMeta.__new__..zCannot subclass )rrrrJrYr()r"rZr[r\r*)r]rrr(jszAnnotatedMeta.__new__cCs |dS)Nr,)r )rRrrrr,oszAnnotatedMeta.__metadata__cCsP|\}}}t|ts t|}n|d|}ddd|D}d|||fS)Nrz, css|]}t|VqdS)N)r )rargrrrrysz+AnnotatedMeta._tree_repr..z %s[%s, %s])r}rrpry _tree_reprr)rRtreer"rr-Ztp_reprZmetadata_reprsrrrr<ss    zAnnotatedMeta._tree_reprNcsh|tkr tStj||d}t|dtrd|ddtkrd|dd}|dd}t|||dfS|S)N)rr)rnrr,)rJrYr r}r)rRrr)rZsub_tpZ sub_annot)r]rrr |s  zAnnotatedMeta._subs_treecCsX|jdkrtd|}x"t|tr<|dtkr<|d}qWt|trP|dS|SdS)z6Return the class used to create instance of this type.NzCCannot get the underlying type of a non-specialized Annotated type.rrn)rrr r}rrJ)rRr=rrr _get_conss   zAnnotatedMeta._get_conscst|ts|f}|jdk r&t|St|tr__orig_class__r)rRr)r*Zconsresultrrr__call__s  zAnnotatedMeta.__call__cCs,|jdk r t|s t||St|dS)N)rr9rr>r)rRrrrr __getattr__szAnnotatedMeta.__getattr__csJt|s|dr"t||n$|jdkr6t|nt|||dS)Nr)r9rrYrrrsetattrr>)rRrvalue)r]rrrs   zAnnotatedMeta.__setattr__cCs tddS)Nz+Annotated cannot be used with isinstance().)r)rRrSrrrrTszAnnotatedMeta.__instancecheck__cCs tddS)Nz+Annotated cannot be used with issubclass().)r)rRr"rrrrUszAnnotatedMeta.__subclasscheck__)NN)rrrrVr(propertyr,r<r r>rrsrArBrrTrUr^rr)r]rr:gs       r:c@seZdZdZdS)rJavAdd 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, the remaining arguments are kept as a tuple in the __metadata__ field. Details: - It's an error to call `Annotated` with less than two arguments. - Nested Annotated are flattened:: Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3] - Instantiating an annotated type is equivalent to instantiating the underlying type:: Annotated[C, Ann1](5) == C(5) - Annotated can be used as a generic type alias:: Optimized = Annotated[T, runtime.Optimize()] Optimized[int] == Annotated[int, runtime.Optimize()] OptimizedList = Annotated[List[T], runtime.Optimize()] OptimizedList[int] == Annotated[List[int], runtime.Optimize()] N)rrrrVrrrrrJs)rcCs.t|trtSt|tr|jS|tkr*tSdS)aGet the unsubscripted version of a type. This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar and Annotated. Return None for unsupported types. Examples:: get_origin(Literal[42]) is Literal get_origin(int) is None get_origin(ClassVar[int]) is ClassVar get_origin(Generic) is Generic get_origin(Generic[T]) is Generic get_origin(Union[T, int]) is Union get_origin(List[Tuple[T, T]][int]) == list N)r}r+rJrrr)rkrrrrHs  cCsdt|tr|jf|jSt|tr`|j}t|tjj kr\|dt k r\t |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) r}r+rr,rrrHrrrEllipsisr)rkrrrrrGs   TypeAliasc@seZdZddZdS)_TypeAliasFormcCs d|jS)Nztyping_extensions.)r)rRrrrrx sz_TypeAliasForm.__repr__N)rrrrxrrrrrHsrHcCstd|dS)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. z{} is not subscriptableN)rrq)rRr#rrrrG#s c@seZdZddZdS)rHcCs d|jS)Nztyping_extensions.)r)rRrrrrx3sz_TypeAliasForm.__repr__N)rrrrxrrrrrH2saSpecial 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.c@seZdZdZddZdS)_TypeAliasMetazMetaclass for TypeAliascCsdS)Nztyping_extensions.TypeAliasr)rRrrrrxFsz_TypeAliasMeta.__repr__N)rrrrVrxrrrrrICsrIc@s,eZdZdZdZddZddZddZd S) _TypeAliasBasea&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. rcCs tddS)Nz+TypeAlias cannot be used with isinstance().)r)rRrSrrrrTVsz _TypeAliasBase.__instancecheck__cCs tddS)Nz+TypeAlias cannot be used with issubclass().)r)rRr"rrrrUYsz _TypeAliasBase.__subclasscheck__cCsdS)Nztyping_extensions.TypeAliasr)rRrrrrx\sz_TypeAliasBase.__repr__N)rrrrVrrTrUrxrrrrrJIs  rJc@s(eZdZdZddZddZddZdS) rIzMetaclass for TypeAliascCs tddS)Nz+TypeAlias cannot be used with isinstance().)r)rRrSrrrrTdsz _TypeAliasMeta.__instancecheck__cCs tddS)Nz+TypeAlias cannot be used with issubclass().)r)rRr"rrrrUgsz _TypeAliasMeta.__subclasscheck__cOs tddS)NzCannot instantiate TypeAlias)r)rRr)r*rrrrAjsz_TypeAliasMeta.__call__N)rrrrVrTrUrArrrrrIasc@seZdZdZdZdS)rGa&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. rN)rrrrVrrrrrrGms )NNF)rr contextlibrrpcollections.abcrr/rrrrrZPEP_560rorr r r r r ImportErrorr Z SUBS_TREErrrrr&rr'r+Z _geqv_defined_collections_abc_check_methodsr6rZHAVE_ANNOTATEDextendrZHAVE_PROTOCOLSrOrPrQrXr8r`rarbrcrerfrgr7rir _SpecialFormrrrr@rArBrrrrrDr9rrrrrrrr<rMutableSequencer:rrrexecr=rMutableMappingr;rrrDictrrrrCrErrFrrrrrLrrVrqrr rrNrMr?r>rr__text_signature__r$r rrrrJrIr+r2r9r:rHrGrGrHrIrJrrrrsP                   5 3    4 3    / -                       &                      I' &    ,) )6 $b"