§ |<ˆjH ãó¢—UdZddlmZddlZddlmZddlZddlmZm Z ddl m Z ddl m Z mZiZded <dd „Zejdd„¦«Zddd„ZdS)z,Transform utilities (filters and decorator).é)Ú annotationsN)ÚIterator)ÚInferenceOverwriteErrorÚUseInferenceDefault)ÚNodeNG)ÚInferenceResultÚInferFnz:dict[tuple[InferFn, NodeNG], list[InferenceResult] | None]Ú_cacheÚreturnÚNonecó8—t ¦«dS)zClear the inference tips cache.N)r Úclear©óúg/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/astroid/inference_tip.pyÚclear_inference_tip_cachers€å ‡L‚L�N„N€N€N€NrÚfuncr ÚinstanceÚargsú typing.AnyÚkwargsúIterator[InferenceResult]cóô—|d} t||f}|€t¦«‚nA#t$r4dt||f<t||i|¤Ž¦«x}t||f<|sJ‚YnwxYwt |¦«S)z(Cache decorator used for inference tips.rN)r rÚKeyErrorÚlistÚiter)rrrrÚnodeÚresults rÚ_inference_tip_cachedrs¦€ð �Œ7€Dð ݘ˜d˜ Ô#ˆð ˆ>Ý%Ñ'Ô'Ð 'ð øå ðððØ!�ˆt�TˆzÑÝ&*¨4¨4°Ð+@¸Ð+@Ð+@Ñ&AÔ&AÐAˆ•˜˜d˜ Ñ#؈ ˆ ˆvˆ ˆ ðøøøõ �‰<Œ<ÐsŠ*ª;A(Á'A(FÚinfer_functionÚraise_on_overwriteÚboolcó‡—|fdˆfd„ }|S)a¥Given an instance specific inference function, return a function to be given to AstroidManager().register_transform to set this inference function. :param bool raise_on_overwrite: Raise an `InferenceOverwriteError` if the inference tip will overwrite another. Used for debugging Typical usage .. sourcecode:: python AstroidManager().register_transform(Call, inference_tip(infer_named_tuple), predicate) .. Note:: Using an inference tip will override any previously set inference tip for the given node. Use a predicate in the transform to prevent excess overwrites. rrr r r c󨕗‰r:|j�3|j|ur*td ||j|¬¦«¦«‚t|¦«|_|S)NzbInference already set to {existing_inference}. Trying to overwrite with {new_inference} for {node})Úexisting_inferenceÚ new_inferencer)Ú_explicit_inferencerÚformatr)rr r!s €rÚ transformz inference_tip..transformCsuø€à ð àÔ(Ð4ØÔ(°Ð>Ð>å)ðFßFLÂfØ'5Ø"&Ô":ØðGMñGôGñôð õ$9¸Ñ#HÔ#HˆÔ ؈ r)rrr r r rr)r r!r)s ` rÚ inference_tipr*-s4ø€ð,;Iðððððððð$ Ðr)r r ) rr rr rrrrr r)F)r r r!r"r r )Ú__doc__Ú __future__rÚtypingÚcollections.abcrÚwraptÚastroid.exceptionsrrÚ astroid.nodesrÚastroid.typingrr r Ú__annotations__rÚ decoratorrr*rrrúr5sòðð 3Ð2Ð2à"Ð"Ð"Ð"Ð"Ð"à € € € Ø$Ð$Ð$Ð$Ð$Ð$à € € € àKÐKÐKÐKÐKÐKÐKÐKØ Ð Ð Ð Ð Ð Ø3Ð3Ð3Ð3Ð3Ð3Ð3Ð3àEG€ÐGÐGÐGÑGððððð „ðððñ„ðð$(ð(ð(ð(ð(ð(ð(r