+
    i                       a  0 t $ R t^ RIHt ^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHt ^ RIHtHt ^ RIHt ^ RIHtHtHt ]! 4       tR	]R
&   ]! 4       tR]R&   ]
! R]R7      tR R ltR R ltRR R lltR# )z,Transform utilities (filters and decorator).)annotations)OrderedDict)	Generator)AnyTypeVar)InferenceContext)InferenceOverwriteErrorUseInferenceDefault)NodeNG)InferenceResultInferFnTransformFnzXOrderedDict[tuple[InferFn[Any], NodeNG, InferenceContext | None], list[InferenceResult]]_cachez set[tuple[InferFn[Any], NodeNG]]_CURRENTLY_INFERRING_NodesT)boundc                   V ^8  d   QhRR/# )   returnNone )formats   "7/usr/lib/python3/dist-packages/astroid/inference_tip.py__annotate__r      s      4     c                 .    \         P                  4        R# )zClear the inference tips cache.N)r   clearr   r   r   clear_inference_tip_cacher      s    
LLNr   c                    V ^8  d   QhRRRR/# )r   funcInferFn[_NodesT]r   r   )r   s   "r   r   r   $   s     0 0 0 05E 0r   c                   a  RR V 3R lllpV# )z(Cache decorator used for inference tips.c               (    V ^8  d   QhRRRRRRRR/# )	r   noder   contextzInferenceContext | Nonekwargsr   r   zGenerator[InferenceResult]r   )r   s   "r   r   +_inference_tip_cached.<locals>.__annotate__'   s0     + ++(+ + 
$	+r   c              ;    <"   SV 3pV\         9   d   \         P                  V4       \        hVe   VP                  4       '       d   R p \        SW3,           R j  xL
  R #  L  \
         d    \         P                  T4        \        S! Y3/ TB 4      ;p\        SY3&   M  \         d	   pTR hR p?ii ; i  \         P                  T4       M  \
         d     Mi ; i\        \        4      ^@8  d   \        P                  RR7        M\   \         P                  T4       M  \
         d     Mi ; i\        \        4      ^@8  d   \        P                  RR7       i i ; ii ; iT R j  xL 
  R # 5i)NF)last)r   remover	   is_emptyr   KeyErroraddlist	Exceptionlenpopitem)r#   r$   r%   partial_cache_keyresulter   s   &&,   r   inner$_inference_tip_cached.<locals>.inner'   sm    
 "4L 44 !''(9:%%7#3#3#5#5G	/dD1222 3 	/ !$$%67/7;1&18 d 34  "T!" 5(//0AB  v;#NNN.(//0AB  v;#NNN. $-	/4 s   AE9E9A& A$A& "E9$A& & E)B%$D%B80B33B88D=CE)C!E) C!!-E)E9E%D('E%(D6	3E%5D6	6/E%%E))E91E42E9)Nr   )r   r4   s   f r   _inference_tip_cachedr6   $   s    + +Z Lr   c               $    V ^8  d   QhRRRRRR/# )r   infer_functionr    raise_on_overwriteboolr   zTransformFn[_NodesT]r   )r   s   "r   r   r   W   s$     + +$+:>++r   c                    a V 3R V3R lllpV# )aq  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.
c               $    V ^8  d   QhRRRRRR/# )r   r#   r   r8   r    r   r   )r   s   "r   r   #inference_tip.<locals>.__annotate__o   s$      '7	r   c                   < S'       dF   V P                   e8   V P                   VJd(   \        RP                  VV P                   V R7      4      h\        V4      V n         V # )NzbInference already set to {existing_inference}. Trying to overwrite with {new_inference} for {node})existing_inferencenew_inferencer#   )_explicit_inferencer   r   r6   )r#   r8   r9   s   &&r   	transform inference_tip.<locals>.transformo   sj     ((4((>)FFLf'5"&":": GM G  $9#H r   r   )r8   r9   rB   s   &f r   inference_tiprD   W   s    2 ;I & r   N)F)__conditional_annotations____doc__
__future__r   collectionsr   collections.abcr   typingr   r   astroid.contextr   astroid.exceptionsr   r	   astroid.nodesr
   astroid.typingr   r   r   r   __annotations__setr   r   r   r6   rD   )rE   s   @r   <module>rQ      sq   
 3 " # %  , K    M  	  := 6 >
)6
*
0f+ +r   