§ |<ˆjj'ãó°—dZddlmZddlZddlZddlZddlZddlmZm Z ddl m Z ddl Z ddl mZmZddlmZddlmZejd krdd l mZndd lmZe d ¦«Zed ¦«Ze jd „¦«ZGd„d¦«Zd„Ze jd„¦«Ze jd„¦«Zej¦«r ddd„Z ddd„Z!dS ddd„Z ddd„Z!dS)z(A few useful function/method decorators.é)Ú annotationsN)ÚCallableÚ Generator)ÚTypeVar)Ú_cacheÚutil)ÚInferenceContext)ÚInferenceError)éé )Ú ParamSpecÚ_RÚ_PcóÈ—t|dd¦«}|€(ix|_}tj |¦« ||S#t $r||i|¤Žx||<}|cYSwxYw)z>Simple decorator to cache result of method calls without args.Ú__cacheN)ÚgetattrrrÚ CACHE_MANAGERÚadd_dict_cacheÚKeyError)ÚfuncÚinstanceÚargsÚkwargsÚcacheÚresults úd/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/astroid/decorators.pyÚcachedrsŽ€õ �H˜i¨Ñ .Ô .€EØ €}Ø#%Ð%ˆÔ˜5ÝÔ×+Ò+¨EÑ2Ô2Ð2ðØ�TŒ{ÐøÝ ðððØ#˜t TÐ4¨VÐ4Ð4Ð4ˆˆd‰ �f؈ ˆ ˆ ðøøøs½AÁA!Á A!có:—eZdZdZdZd„Zed„¦«Zdd„ZdS)Úcachedpropertya³Provides a cached property equivalent to the stacking of @cached and @property, but more efficient. After first usage, the becomes part of the object's __dict__. Doing: del obj. empties the cache. Idea taken from the pyramid_ framework and the mercurial_ project. .. _pyramid: http://pypi.python.org/pypi/pyramid .. _mercurial: http://pypi.python.org/pypi/Mercurial )ÚwrappedcóÈ—tjdkrtjdtd¬¦« |jn%#t $r}t|›d�¦«|‚d}~wwxYw||_dS)N)r éz}cachedproperty has been deprecated and will be removed in astroid 3.0 for Python 3.8+. Use functools.cached_property instead.é©Ú stacklevelz must have a __name__ attribute) ÚsysÚ version_infoÚwarningsÚwarnÚDeprecationWarningÚ__name__ÚAttributeErrorÚ TypeErrorr )Úselfr Úexcs rÚ__init__zcachedproperty.__init__@s�€Ý Ô ˜vÒ %Ð %Ý ŒMð9å"Øð  ñ ô ð ð  RØ Ô Ð Ð øÝð Rð Rð RݘwÐGÐGÐGÑHÔHÈcÐ Qøøøøð RøøøàˆŒ ˆ ˆ s®6¶ AÁAÁAcóF—t|jdd¦«}d|rd|zndzS)NÚ__doc__z+%sz %sÚ)rr )r.Údocs rr2zcachedproperty.__doc__Ns2€å�d”l I¨tÑ4Ô4ˆØ<ØÐ 'ˆF�S‰LˆL Rñ ð óNcón—|€|S| |¦«}t||jj|¦«|S©N)r Úsetattrr+)r.ÚinstÚobjtypeÚvals rÚ__get__zcachedproperty.__get__Us9€Ø ˆ<؈KØ�lŠl˜4Ñ Ô ˆÝ��d”lÔ+¨SÑ1Ô1Ð1؈ r5r7)r+Ú __module__Ú __qualname__r2Ú __slots__r0Úpropertyr<©r5rrr/sc€€€€€ð ð ð€Ið ð ð ðð ð ñ„Xð ð ðððððr5rcóH—tj|¦«d|fdd„¦«}|S)zÄReturn the given infer function wrapped to handle the path. Used to stop inference if the node has already been looked at for a given `InferenceContext` to prevent infinite recursion NÚcontextúInferenceContext | NoneÚreturnrc;óüK—|€t¦«}| |¦«rdSt¦«}|||fi|¤ŽD]9}|jjdkr|j}n|}||vr|V—| |¦«Œ:dS)z"Wrapper function handling context.NÚInstance)r ÚpushÚsetÚ __class__r+Ú_proxiedÚadd)ÚnoderCÚ_funcrÚyieldedÚresÚaress rr zpath_wrapper..wrappedds¬èè€ð ˆ?Ý&Ñ(Ô(ˆGØ �<Š<˜Ñ Ô ð Ø ˆFå‘%”%ˆà�5˜˜wÐ1Ð1¨&Ð1Ð1ð "ð "ˆCàŒ}Ô%¨Ò3Ð3Ø”|��à�ؘ7Ð"Ð"Ø� � � Ø— ’ ˜DÑ!Ô!Ð!øð "ð "r5)rCrDrEr©Ú functoolsÚwraps)rr s rÚ path_wrapperrU]s>€õ„_�TÑÔà15¸Tð"ð"ð"ð"ñÔð"ð* €Nr5c#óŽK—||i|¤Ž} t|¦«V—n#t$rtjV—YdSwxYw|Ed{V—†dSr7)ÚnextÚ StopIterationrÚ Uninferable)rrrrÚ generators rÚyes_if_nothing_inferredr[}s…èè€à��dÐ%˜fÐ%Ð%€IðÝ�9‰oŒoÐÐÐÐøÝ ðððåÔÐÐÐØˆˆðøøøð ÐÐÐÐÐÐÐÐÐs Œž:¹:c#ó6K—||i|¤Ž} t|¦«V—ns#t$r4}|jrtdi|jd¤Ž|‚td¦«|‚d}~wt$r*}tdt j¦«›d�¦«|‚d}~wwxYw|Ed{V—†dS)Nrz3StopIteration raised without any error information.z!RecursionError raised with limit ú.rA)rWrXrr ÚRecursionErrorr&Úgetrecursionlimit)rrrrrZÚerrors rÚraise_if_nothing_inferredra‹sõèè€à��dÐ%˜fÐ%Ð%€Ið Ý�9‰oŒoÐÐÐÐøÝ ðððà Œ:ð =å Ð1Ð1 5¤:¨a¤=Ð1Ð1°uÐ <ÝØ Añ ô àð øøøøõ ðððÝØ JµÔ0EÑ0GÔ0GÐ JÐ JÐ Jñ ô àð øøøøðøøøð ÐÐÐÐÐÐÐÐÐs Œž B¨/AÁ BÁ$%B  Bú3.0Úastroid_versionÚstrÚ argumentsrEú.Callable[[Callable[_P, _R]], Callable[_P, _R]]c 󇇗dˆˆfd„ }|S)a›Decorator which emits a DeprecationWarning if any arguments specified are None or not passed at all. Arguments should be a key-value mapping, with the key being the argument to check and the value being a type annotation as string for the value of the argument. To improve performance, only used when DeprecationWarnings other than the default one are enabled. rúCallable[_P, _R]rEcóN•‡—tj‰¦«dˆˆˆfd„ ¦«}|S) úDecorator function.rú_P.argsrú _P.kwargsrErcó`•—ttj‰¦«j ¦«¦«}‰ ¦«D]Ù\}} | |¦«}n5#t$r(td|›d|djj ›d�¦«d‚wxYw||vr||�8||vrx|dks.t|¦«|kst|¦«|krL||€Dtj d|›d|djj ›d‰j ›d ‰›d |›d |›d � td ¬¦«ŒÚ‰|i|¤ŽS)z/Emit DeprecationWarnings if conditions are met.úCan't find argument 'ú' for 'rú'Néÿÿÿÿz#' will be a required argument for 'r]z ' in astroid z ('z' should be of type: 'z')r#r$©ÚlistÚinspectÚ signatureÚ parametersÚkeysÚitemsÚindexÚ ValueErrorrJr>Úlenr(r)r+r*) rrrwÚargÚtype_annotationryrercrs €€€rÚwrapperz@deprecate_default_argument_values..deco..wrapper¸s¶ø€õ�GÔ-¨dÑ3Ô3Ô>×CÒCÑEÔEÑFÔF�Ø,5¯OªOÑ,=Ô,=ððÑ(�C˜ð$Ø $§ ¢ ¨3¡¤˜˜øÝ%ð$ð$ð$Ý(Øa°CÐaÐaÀÀQÄÔ@QÔ@^ÐaÐaÐañôà#ð$ð$øøøð ˜˜¨6°#¬;Ð+>ð  fÐ,Ð,à! RšK˜KÝ" 4™yœy¨EÒ1Ð1Ý # D¡ ¤ ¨EÒ 1Ð 1°d¸5´kÐ6Iõ!œ ðP ðPðPØ $ Q¤Ô 1Ô >ðPðPØAEÄðPðPà+:ðPðPð"%ðPðPð=LðPðPðPõ/Ø'(ð ñôðøð�t˜TÐ, VÐ,Ð,Ð,ó ÁA*Á*2B©rrkrrlrErrR©rr~rercs` €€rÚdecoz/deprecate_default_argument_values..decoµsKøø€õŒ_˜TÑ "Ô "ð# -ð# -ð# -ð# -ð# -ð# -ð# -ñ#Ô "ð# -ðJˆNr5©rrhrErhrA©rcrer‚s`` rÚ!deprecate_default_argument_valuesr…¥s/øø€ð ) ð) ð) ð) ð) ð) ð) ðVˆ r5c 󇇗dˆˆfd„ }|S)a�Decorator which emits a DeprecationWarning if any arguments specified are passed. Arguments should be a key-value mapping, with the key being the argument to check and the value being a string that explains what to do instead of passing the argument. To improve performance, only used when DeprecationWarnings other than the default one are enabled. rrhrEcóN•‡—tj‰¦«dˆˆˆfd„ ¦«}|S) NrrkrrlrErcó•—ttj‰¦«j ¦«¦«}‰ ¦«D]©\}} | |¦«}n5#t$r(td|›d|djj ›d�¦«d‚wxYw||vst|¦«|krAtj d|›d|djj ›d‰j ›d‰›d|›d � td ¬ ¦«Œª‰|i|¤ŽS) NrnrorrpzThe argument 'r]z/' is deprecated and will be removed in astroid z (ú)r#r$rr) rrrwr|Únoteryrercrs €€€rr~z2deprecate_arguments..deco..wrapperðscø€å�GÔ-¨dÑ3Ô3Ô>×CÒCÑEÔEÑFÔF�Ø!*§¢Ñ!2Ô!2ðð‘I�C˜ð$Ø $§ ¢ ¨3¡¤˜˜øÝ%ð$ð$ð$Ý(Øa°CÐaÐaÀÀQÄÔ@QÔ@^ÐaÐaÐañôà#ð$ð$øøøð˜f�}�}­¨D© ¬ °EÒ(9Ð(9Ý œ ðY¨SðYðYØ $ Q¤Ô 1Ô >ðYðYØAEÄðYðYà>MðYðYàQUðYðYðYõ/Ø'(ð ñôðøð�t˜TÐ, VÐ,Ð,Ð,rr€rRr�s` €€rr‚z!deprecate_arguments..decoïsHøø€Ý Œ_˜TÑ "Ô "ð -ð -ð -ð -ð -ð -ð -ñ#Ô "ð -ð&ˆNr5rƒrAr„s`` rÚdeprecate_argumentsr‹âs.øø€ð ð ð ð ð ð ð ð.ˆ r5c ó—dd„}|S)úbPassthrough decorator to improve performance if DeprecationWarnings are disabled. rrhrEcó—|S©rjrA©rs rr‚z/deprecate_default_argument_values..decoó€àˆKr5rƒrAr„s rr…r… ó€ð ð ð ð ðˆ r5c ó—dd„}|S)r�rrhrEcó—|Sr�rAr�s rr‚z!deprecate_arguments..decor‘r5rƒrAr„s rr‹r‹r’r5)rb)rcrdrerdrErf)"r2Ú __future__rrSrtr&r(Úcollections.abcrrÚtypingrÚwraptÚastroidrrÚastroid.contextr Úastroid.exceptionsr r'r Útyping_extensionsrrÚ decoratorrrrUr[raÚcheck_warnings_filterr…r‹rAr5rúrŸs8ðð /Ð.à"Ð"Ð"Ð"Ð"Ð"àÐÐÐØ€€€Ø € € € Ø€€€Ø/Ð/Ð/Ð/Ð/Ð/Ð/Ð/ØÐÐÐÐÐà € € € à Ð Ð Ð Ð Ð Ð Ð Ø,Ð,Ð,Ð,Ð,Ð,Ø-Ð-Ð-Ð-Ð-Ð-àÔ�wÒÐØ Ð Ð Ð Ð Ð Ð à+Ð+Ð+Ð+Ð+Ð+à €WˆT�]„]€Ø€Yˆt�_„_€ð„ð ð ñ„ð ð+ð+ð+ð+ð+ñ+ô+ð+ð\ððð@„ð ð ñ„ð ð„ððñ„ðð.€4ÔÑÔðð %ð;ð;ð;ð;ð;ð| %ð$ð$ð$ð$ð$ð$ð$ðR %ð ð ð ð ð ð %ð ð ð ð ð ð ð r5