o cc'@sdZddlZddZeeZeddZeejZeejZ eej Z ddZ ee Z d d ZeeZd d ZeZeeZed dZeZeeZGdddZeejZeeZegjZeejZeejZ ee!j"Z#ee$jdZ%eeZ&ze'e'ye(dZ)ee)Z*ee)j+Z,dZ)[)YnweejZ-eej.Z/[[[[[[d$ddZ0ddZ1d%ddZ2ddZ3GdddZ4GdddZ5d d!Z6ee7e8Z9ee8e!BZ:ee;ZZ?d"d#e@DZAdS)&zO Define names for built-in types that aren't directly accessible as a builtin. NcCdSNrrrf/home/lily/lilypond-2.24.1/release/binaries/dependencies/install/Python-3.10.8/lib/python3.10/types.py_f rcCrrrrrrr rrcsdfdd}|jdS)Ncrrrrarrfrz_cell_factory..fr) __closure__)r rr r _cell_factorys  rccs dVdS)Nr rrrrr_g rcsdSrrrrrr_csrcCs dVdSrrrrrr_ag"rrc@seZdZddZdS)_CcCrrrselfrrr_m(rz_C._mN)__name__ __module__ __qualname__rrrrrr's rfromkeysrcCsNt|}t|||\}}}|dur||||ur||d<||||fi|S)zBCreate a class object dynamically using the appropriate metaclass.NZ__orig_bases__) resolve_bases prepare_class)namebaseskwdsZ exec_bodyZresolved_basesmetansrrr new_classEsr#cCst|}d}d}t|D]9\}}t|trt|tsq t|ds!q ||}d}t|ts1td||||||d<|t |d7}q |sJ|St|S)z8Resolve MRO entries dynamically as specified by PEP 560.Fr__mro_entries__Tz#__mro_entries__ must return a tupler ) list enumerate isinstancetype GenericAliashasattrr$tuple TypeErrorlen)rZ new_basesupdatedZshiftibaseZnew_baserrrrOs"   rcCs|duri}nt|}d|vr|d}n |rt|d}nt}t|tr*t||}t|dr:|j||fi|}ni}|||fS)azCall the __prepare__ method of the appropriate metaclass. Returns (metaclass, namespace, kwds) as a 3-tuple *metaclass* is the appropriate metaclass *namespace* is the prepared class namespace *kwds* is an updated copy of the passed in kwds argument with any 'metaclass' entry removed. If no kwds argument is passed in, this will be an empty dict. N metaclassr __prepare__)dictpopr(r'_calculate_metar*r2)rrr r!r"rrrrds      rcCs<|}|D]}t|}t||rqt||r|}qtd|S)z%Calculate the most derived metaclass.zxmetaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases)r( issubclassr,)r!rZwinnerr0Z base_metarrrr5s  r5c@sLeZdZdZdddZdddZddZd d Zd d Zd dZ ddZ dS)DynamicClassAttributeaRoute attribute access on a class to __getattr__. This is a descriptor, used to define attributes that act differently when accessed through an instance and through a class. Instance access remains normal, but access to an attribute through a class will be routed to the class's __getattr__ method; this is done by raising AttributeError. This allows one to have properties active on an instance, and have virtual attributes on the class with the same name. (Enum used this between Python versions 3.4 - 3.9 .) Subclass from this to use a different method of accessing virtual atributes and still be treated properly by the inspect module. (Enum uses this since Python 3.10 .) NcCs>||_||_||_|p |j|_|du|_tt|dd|_dS)N__isabstractmethod__F)fgetfsetfdel__doc__ overwrite_docboolgetattrr8)rr9r:r;docrrr__init__s   zDynamicClassAttribute.__init__cCs4|dur |jr |St|jdurtd||S)Nzunreadable attribute)r8AttributeErrorr9)rinstanceZ ownerclassrrr__get__s  zDynamicClassAttribute.__get__cCs"|jdur td|||dS)Nzcan't set attribute)r:rB)rrCvaluerrr__set__s zDynamicClassAttribute.__set__cCs |jdur td||dS)Nzcan't delete attribute)r;rB)rrCrrr __delete__s z DynamicClassAttribute.__delete__cCs8|jr|jnd}t|||j|j|p|j}|j|_|Sr)r=r<r(r:r;)rr9ZfdocresultrrrgetterszDynamicClassAttribute.gettercCs$t||j||j|j}|j|_|Sr)r(r9r;r<r=)rr:rHrrrsetterzDynamicClassAttribute.settercCs$t||j|j||j}|j|_|Sr)r(r9r:r<r=)rr;rHrrrdeleterrKzDynamicClassAttribute.deleter)NNNNr) rrrr<rArDrFrGrIrJrLrrrrr7s    r7c@seZdZddZddZddZddZed d Zed d Z ed dZ eddZ eZ e Z e Ze ZddZddZeZdS)_GeneratorWrappercCs2||_|jtu|_t|dd|_t|dd|_dS)Nrr)_GeneratorWrapper__wrapped __class__ GeneratorType_GeneratorWrapper__isgenr?rr)rgenrrrrAs z_GeneratorWrapper.__init__cCs |j|Sr)rNsend)rvalrrrrSs z_GeneratorWrapper.sendcGs|jj|g|RSr)rNthrow)rZtprestrrrrUsz_GeneratorWrapper.throwcCs |jSr)rNcloserrrrrW z_GeneratorWrapper.closecC|jjSr)rNgi_coderrrrrZz_GeneratorWrapper.gi_codecCrYr)rNgi_framerrrrr\r[z_GeneratorWrapper.gi_framecCrYr)rN gi_runningrrrrr]r[z_GeneratorWrapper.gi_runningcCrYr)rN gi_yieldfromrrrrr^r[z_GeneratorWrapper.gi_yieldfromcCs t|jSr)nextrNrrrr__next__rXz_GeneratorWrapper.__next__cCs|jr|jS|Sr)rQrNrrrr__iter__sz_GeneratorWrapper.__iter__N)rrrrArSrUrWpropertyrZr\r]r^cr_codecr_frame cr_runningcr_awaitr`ra __await__rrrrrMs(    rMcststdjtur3tddjtur3jj}|d@r S|d@r3j}|j|jdBd_Sddl }ddl | fd d }|S) z2Convert regular generator function to a coroutine.z$types.coroutine() expects a callable__code__Ni )co_flagsrcsV|i|}|jtus|jtur|jjd@r|St|jr)t|js)t|S|S)Nrj) rO CoroutineTyperPrZrkr' Generator CoroutinerM)argskwargscoro_collections_abcfuncrrwrappeds   zcoroutine..wrapped) callabler,rO FunctionTyper?CodeTyperhrkreplace functoolsrswraps)rtrkZcorzrurrrr coroutines  r|cCs g|] }|dddkr|qS)Nr _r).0nrrr 3s r)rNN)rN)Br<sysrr(rwZ LambdaTyperhrx__dict__MappingProxyTypeimplementationZSimpleNamespacerZCellTyperrPrrlrWrZAsyncGeneratorTyperr MethodTyper-ZBuiltinFunctionTypeappendZBuiltinMethodTypeobjectrAZWrapperDescriptorType__str__ZMethodWrapperTypestrjoinZMethodDescriptorTyper3ZClassMethodDescriptorType ModuleTyper,exc_infotbZ TracebackTypetb_frameZ FrameTypeZGetSetDescriptorType __globals__ZMemberDescriptorTyper#rrr5r7rMr|r%intr)Z UnionTypeEllipsis EllipsisTypeZNoneTypeNotImplementedZNotImplementedTypeglobals__all__rrrrsh                     ?% 3