
    ^h+G                     t   S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  SSKJr  SS	KJr  SS
KJr  SSKJr  \" 5       r " S S\5      r " S S5      r " S S\5      rS"S jr " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S5      r S r! " S S 5      r"\"" / 5      r#S! r$g)#a4  
Values are the "values" that Python would return. However Values are at the
same time also the "values" that a user is currently sitting in.

A ValueSet is typically used to specify the return of a function or any other
static analysis operation. In jedi there are always multiple returns and not
just one.
    )reduce)add)zip_longest)Name)debug)clean_scope_docstringSimpleGetItemNotFound)safe_property)%inference_state_as_method_param_cache)memoize_methodc                       \ rS rSrSrg)HasNoContext    N)__name__
__module____qualname____firstlineno____static_attributes__r       S/home/james-whalen/.local/lib/python3.13/site-packages/jedi/inference/base_value.pyr   r      s    r   r   c                       \ rS rSrS rS rS rS rS rSS jr	S	 r
SS
 jr  SS jrS rS rSS jrS rS r\S 5       rSrg)HelperValueMixin   c                 |    U nUR                   c  UR                  5       $  UR                   c  U$ UR                   nM  N)parent_context
as_context)selfvalues     r   get_root_context!HelperValueMixin.get_root_context   sF    '##%%##+((E r   c                 4    U R                   R                  XS9$ )N)	argumentsinference_stateexecuter    r%   s     r   r(   HelperValueMixin.execute(   s    ##++D+FFr   c                     SSK Jn  U" U Vs/ s H  n[        U/5      PM     sn5      nU R                  R	                  X5      $ s  snf )Nr   )ValuesArguments)jedi.inference.argumentsr,   ValueSetr'   r(   )r    
value_listr,   r!   r%   s        r   execute_with_values$HelperValueMixin.execute_with_values+   sB    <#J$OJ5Xug%6J$OP	##++D<< %Ps   Ac                 "    U R                  5       $ r   r0   r    s    r   execute_annotation#HelperValueMixin.execute_annotation0   s    ''))r   c                     [        U /5      $ r   r.   r4   s    r   gather_annotation_classes*HelperValueMixin.gather_annotation_classes3   s    r   Nc                 X    [         R                  S U R                  X5       5       5      $ )Nc              3   B   #    U  H  nUR                  5       v   M     g 7fr   infer.0
lazy_values     r   	<genexpr>:HelperValueMixin.merge_types_of_iterate.<locals>.<genexpr>7   s#      "
I
 I   r.   	from_setsiterate)r    contextualized_nodeis_asyncs      r   merge_types_of_iterate'HelperValueMixin.merge_types_of_iterate6   s,    !! "
"ll+>I"
 
 	
r   c              #     #    [        U[        5      (       a  UOS nU R                  US9 S h  vN   U R                  5       (       a8  SSKJn  U" [        U 15      5       H  nUR                  5        S h  vN   M     g g  NR N7f)N)origin_scoper   )convert_values)
isinstancer   get_filtersis_stub!jedi.inference.gradual.conversionrN   r.   )r    name_or_strrM   rN   cs        r   _get_value_filters#HelperValueMixin._get_value_filters<   sq     &0d&C&C{###>>><<>>H#HdV$45==?** 6  	?
 +s"   ,BBAB6B7BBc                     SSK Jn  U R                  U5      nUR                  XQ5      n[        R
                  " SXU5        U$ )Nr   )finderzcontext.goto %s in (%s): %s)jedi.inferencerX   rU   filter_namer   dbg)r    rS   name_contextanalysis_errorsrX   filtersnamess          r   gotoHelperValueMixin.gotoE   s;    )))+6""78		/EJr   c                    Uc  U nU R                  XU5      n[        R                  S U 5       5      nU(       d4  [        U[        5      (       a  UR
                  OUnU R                  U5      nU(       d;  U(       d4  U(       a-  [        U[        5      (       a  SSKJn  UR                  X U5        [        R                  " SXV5        U$ )zJ
:param position: Position of the last statement -> tuple of line, column
c              3   @   #    U  H  oR                  5       v   M     g 7fr   r=   )r@   names     r   rB   6HelperValueMixin.py__getattribute__.<locals>.<genexpr>T   s     #CUTJJLLU   r   analysisz context.names_to_types: %s -> %s)r`   r.   rF   rO   r   r!   py__getattribute__alternativesrY   rh   add_attribute_errorr   r[   )	r    rS   r\   positionr]   r_   valuesnrh   s	            r   py__getattribute__#HelperValueMixin.py__getattribute__L   s    
 L		+_E###CU#CC%/T%B%B!!A88;FV+t,,3,, 5		4eDr   c                     U R                  S5      nU(       d  [        R                  " SU 5        UR                  5       $ )N	__await__z"Tried to run __await__ on value %s)rn   r   warningr0   )r    await_value_sets     r   py__await__HelperValueMixin.py__await__a   s3    11+>MM>E2244r   c                 .    U R                   R                  $ r   )rd   string_namer4   s    r   
py__name__HelperValueMixin.py__name__g   s    yy$$$r   c                 Z   [         R                  " SU 5        U(       a}  SSKJn  [	        U" U R                  S5      R                  5       R                  S5      R                  5       R                  S5      R                  5       R                  5       5      /5      $ U R                  U5      $ )Nz
iterate %sr   )LazyKnownValues	__aiter__	__anext__rq   )	r   r[   jedi.inference.lazy_valuer{   iterrn   r0   py__stop_iteration_returns
py__iter__)r    rH   rI   r{   s       r   rG   HelperValueMixin.iteratej   s    		,%A ++K8LLN++K89L9L9N++K89L9L9N335	   233r   c                 6   [         R                  " SU < SU< 3SS9   U R                  5        H8  nUR                  U5      (       d  M  [         R                  " SSS9    S S S 5        g   [         R                  " SSS9   S S S 5        g! , (       d  f       g = f)	Nzsubclass matching of z <=> BLUE)colorzmatched subclass TrueTzmatched subclass FalseF)r   increase_indent_cm	py__mro__is_same_classr[   )r    class_valueclss      r   is_sub_class_of HelperValueMixin.is_sub_class_ofz   s{    %%$P[&\,24~~'$$[11II5VD4 4' II.f=4 4 4s   (B

B
)B


Bc                 z    [        U5      R                  [        R                  :w  a  UR                  U 5      $ X:H  $ r   )typer   r   )r    class2s     r   r   HelperValueMixin.is_same_class   s4    <%%)9)G)GG''--~r   c                 &    U R                   " U0 UD6$ r   )_as_contextr    argskwargss      r   r   HelperValueMixin.as_context   s    000r   r   NF)NT)NNT)r   r   r   r   r"   r(   r0   r5   r9   rJ   rU   r`   rn   rt   rx   rG   r   r   r   r   r   r   r   r   r   r      sg    )G=
* 
+ KO+/*5%4  1 1r   r   c                       \ rS rSrSrSrSrSrS$S jrS r	S r
S$S jrS$S	 jrS
 rS rS rS rS rS rS rS rS rS rS rS r\4S jrS rS rS rS rS rS r S r!S r"S r#\$S  5       r%S%S! jr&S" r'S#r(g)&Value   z"
To be implemented by subclasses.
Nnot_defined_please_report_bugc                     Xl         X l        g r   r'   r   )r    r'   r   s      r   __init__Value.__init__   s    .,r   c                 l    SSK Jn  UR                  UR                  SUR                  SU -  S9  [
        $ )Nr   rg   ztype-error-not-subscriptablez+TypeError: '%s' object is not subscriptablemessage)rY   rh   r   contextnode	NO_VALUES)r    index_value_setrH   rh   s       r   py__getitem__Value.py__getitem__   s;    +''*$$ADH	 	 	
 r   c                     [         er   r	   )r    indexs     r   py__simple_getitem__Value.py__simple_getitem__   s    ##r   c                 |    Ub/  SSK Jn  UR                  UR                  SUR                  SU -  S9  [        / 5      $ )Nr   rg   ztype-error-not-iterablez&TypeError: '%s' object is not iterabler   )rY   rh   r   r   r   r   )r    rH   rh   s      r   r   Value.py__iter__   sE    */LL#++)#((@4G	  I
 Bxr   c                 $    U R                  U5      $ r   )r   )r    rH   s     r   
py__next__Value.py__next__   s    233r   c                     / $ r   r   r4   s    r   get_signaturesValue.get_signatures   s    	r   c                     gr   r   r4   s    r   is_classValue.is_class       r   c                     gr   r   r4   s    r   is_class_mixinValue.is_class_mixin   r   r   c                     gr   r   r4   s    r   is_instanceValue.is_instance   r   r   c                     gr   r   r4   s    r   is_functionValue.is_function   r   r   c                     gr   r   r4   s    r   	is_moduleValue.is_module   r   r   c                     gr   r   r4   s    r   is_namespaceValue.is_namespace   r   r   c                     gr   r   r4   s    r   is_compiledValue.is_compiled   r   r   c                     gr   r   r4   s    r   is_bound_methodValue.is_bound_method   r   r   c                     gr   r   r4   s    r   is_builtins_moduleValue.is_builtins_module   r   r   c                     g)zj
Since Wrapper is a super class for classes, functions and modules,
the return value will always be true.
Tr   r4   s    r   
py__bool__Value.py__bool__   s    
 r   c                 z     U R                   R                    [        U R                   5      $ ! [         a     gf = f)N )	tree_nodeget_doc_noder   AttributeErrorr4   s    r   	py__doc__Value.py__doc__   s9    	9NN'' )88  		s   - 
::c                 4    U[         L a  [        SU -  5      eU$ )Nz'There exists no safe value for value %s)sentinel
ValueError)r    defaults     r   get_safe_valueValue.get_safe_value   s     hFMNNr   c                 >    [         R                  " SX U5        [        $ )Nz!%s not possible between %s and %sr   rr   r   )r    otheroperators      r   execute_operationValue.execute_operation   s    985Qr   c                 <    [         R                  " SU 5        [        $ )Nzno execution possible %sr   r)   s     r   
py__call__Value.py__call__   s    0$7r   c                 <    [         R                  " SU 5        [        $ )Nz0Not possible to return the stop iterations of %sr   r4   s    r   r    Value.py__stop_iteration_returns   s    H$Or   c                     [         $ )z8
For now a way to add values in cases like __getattr__.
)r   )r    rS   s     r   ri   $Value.py__getattribute__alternatives   s
     r   c                 H    [         R                  " SU 5        [        U /5      $ )NzNo __get__ defined on %s)r   rr   r.   )r    instancer   s      r   	py__get__Value.py__get__   s    0$7r   c                     [         $ r   )NotImplemented)r    calling_instancer   r   s       r   py__get__on_classValue.py__get__on_class   s    r   c                     g r   r   r4   s    r   get_qualified_namesValue.get_qualified_names  s    r   c                 6    U R                   R                  5       $ r   )r   rQ   r4   s    r   rQ   Value.is_stub  s    ""**,,r   c                     [         er   )r   r4   s    r   r   Value._as_context  s    r   c                     [         er   NotImplementedErrorr4   s    r   rd   
Value.name  s    !!r   c                     g r   r   )r    add_class_infos     r   get_type_hintValue.get_type_hint  s    r   c                     0 $ )a  
When the current instance represents a type annotation, this method
tries to find information about undefined type vars and returns a dict
from type var name to value set.

This is for example important to understand what `iter([1])` returns.
According to typeshed, `iter` returns an `Iterator[_T]`:

    def iter(iterable: Iterable[_T]) -> Iterator[_T]: ...

This functions would generate `int` for `_T` in this case, because it
unpacks the `Iterable`.

Parameters
----------

`self`: represents the annotation of the current parameter to infer the
    value for. In the above example, this would initially be the
    `Iterable[_T]` of the `iterable` parameter and then, when recursing,
    just the `_T` generic parameter.

`value_set`: represents the actual argument passed to the parameter
    we're inferred for, or (for recursive calls) their types. In the
    above example this would first be the representation of the list
    `[1]` and then, when recursing, just of `1`.
r   )r    	value_sets     r   infer_type_varsValue.infer_type_vars  s	    6 	r   r   r   T))r   r   r   r   __doc__r   
array_typeapi_typer   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ri   r   r   r   rQ   r   propertyrd   r  r  r   r   r   r   r   r      s     I J.H-	$49 &. 
 - " "r   r   Nc                 T    [         R                  S U R                  XS9 5       5      $ )zw
Calls `iterate`, on all values but ignores the ordering and just returns
all values that the iterate functions yield.
c              3   B   #    U  H  nUR                  5       v   M     g 7fr   r=   r?   s     r   rB   !iterate_values.<locals>.<genexpr>8  s#      PJ 	PrD   rI   rE   )rl   rH   rI   s      r   iterate_valuesr  3  s0    
   ..)<.P  r   c                   N    \ rS rSr\S 5       r\\" 5       S 5       5       rS r	Sr
g)_ValueWrapperBasei>  c                     SSK Jn  U R                  R                  nUR                  b  U" XR                  5      $ SSKJn  U" XR                  5      $ )Nr   )	ValueName)CompiledValueName)jedi.inference.namesr  _wrapped_valuerd   	tree_namejedi.inference.compiledr  rw   )r    r  wrapped_namer  s       r   rd   _ValueWrapperBase.name?  sG    2**//!!-T#9#9::A$T+C+CDDr   c                     U " U0 UD6$ r   r   )r   r'   r   r   s       r   create_cached_ValueWrapperBase.create_cachedI  s     D#F##r   c                 H    US:w  d   S5       e[        U R                  U5      $ )Nr  zProblem with _get_wrapped_value)getattrr  )r    rd   s     r   __getattr___ValueWrapperBase.__getattr__N  s*    ''J)JJ't**D11r   r   N)r   r   r   r   r   rd   classmethodr   r   r$  r   r   r   r   r  r  >  s:    E E *,$ - $2r   r  c                   :    \ rS rSr\\S 5       5       rS rS rSr	g)LazyValueWrapperiS  c                     [         R                  " S5         U R                  5       sS S S 5        $ ! , (       d  f       g = f)NzResolve lazy value wrapper)r   r   _get_wrapped_valuer4   s    r   r  LazyValueWrapper._wrapped_valueT  s,     %%&BC**, DCCs   1
?c                 4    SU R                   R                  -  $ )Nz<%s>)	__class__r   r4   s    r   __repr__LazyValueWrapper.__repr__Z  s    0011r   c                     [         er   r   r4   s    r   r*  #LazyValueWrapper._get_wrapped_value]  s    !!r   r   N)
r   r   r   r   r   r   r  r.  r*  r   r   r   r   r(  r(  S  s&    -  -2"r   r(  c                        \ rS rSrS rS rSrg)ValueWrapperia  c                     Xl         g r   r  )r    wrapped_values     r   r   ValueWrapper.__init__b  s    +r   c                 R    U R                   R                  < SU R                  < S3$ )N())r-  r   r  r4   s    r   r.  ValueWrapper.__repr__e  s    >>22D4G4GHHr   r5  N)r   r   r   r   r   r.  r   r   r   r   r3  r3  a  s    ,Ir   r3  c                   .   ^  \ rS rSrU 4S jrS rSrU =r$ )	TreeValueii  c                 0   > [         TU ]  X5        X0l        g r   )superr   r   )r    r'   r   r   r-  s       r   r   TreeValue.__init__j  s    9"r   c                 T    SU R                   R                  < SU R                  < S3$ )N<: >)r-  r   r   r4   s    r   r.  TreeValue.__repr__n  s    !^^44dnnEEr   )r   )r   r   r   r   r   r.  r   __classcell__)r-  s   @r   r=  r=  i  s    #F Fr   r=  c                   ,    \ rS rSrS rS rS rS rSrg)ContextualizedNodeir  c                     Xl         X l        g r   r   r   )r    r   r   s      r   r   ContextualizedNode.__init__s  s    	r   c                 6    U R                   R                  5       $ r   )r   r"   r4   s    r   r"   #ContextualizedNode.get_root_contextw  s    ||,,..r   c                 L    U R                   R                  U R                  5      $ r   )r   
infer_noder   r4   s    r   r>   ContextualizedNode.inferz  s    ||&&tyy11r   c                 p    SU R                   R                  < SU R                  < SU R                  < S3$ )NrB  rC  z in rD  )r-  r   r   r   r4   s    r   r.  ContextualizedNode.__repr__}  s!    #'>>#:#:DIIt||TTr   rJ  N)	r   r   r   r   r   r"   r>   r.  r   r   r   r   rH  rH  r  s    /2Ur   rH  c                    [         n[        5       nU Ha  nUR                  S S9n[        U5      [        [
        [        [        [        4;   a   X0R                  U5      -  nMP  UR                  U5        Mc     U(       d  U(       d  X0R                  [        U5      U5      -  n[        R                  " SU5        U$ ! [         a     Nef = f)N)r   zpy__getitem__ result: %s)r   setr   r   floatintstrslicebytesr   r
   r   r   r.   r   r[   )r!   index_valuesrH   resultunused_valuesindex_valuer   s          r   _getitemr^    s    FEM#**4*8;5#sE59944U;; 	+& $ L%%]#
 	
 
II(&1M ) s   B<<
C	C	c                       \ rS rSrS r\S 5       r\S 5       rS rS r	S r
S rS	 rS
 rS rS rS rS rS rS rSS jrS rS rS rS rS rS rS rS rSS jrS rSrg) r.   i  c                 d    [        U5      U l        U H  n[        U[        5      (       d  M   e   g r   )	frozenset_setrO   r.   )r    iterabler!   s      r   r   ValueSet.__init__  s+    h'	E!%2222 r   c                 4    U R                  U 5      nXl        U$ r   )__new__rb  )r   
frozenset_r    s      r   _from_frozen_setValueSet._from_frozen_set  s    {{3	r   c                     [        5       nU H6  n[        U[        5      (       a  X#R                  -  nM(  U[	        U5      -  nM8     U R                  [	        U5      5      $ )z'
Used to work with an iterable of set.
)rT  rO   r.   rb  ra  rh  )r   sets
aggregatedset_s       r   rF   ValueSet.from_sets  sT    
 U
D$))ii'
io-
	 
 ##Ij$9::r   c                 R    U R                  U R                  UR                  -  5      $ r   rh  rb  r    r   s     r   __or__ValueSet.__or__       $$TYY%;<<r   c                 R    U R                  U R                  UR                  -  5      $ r   rp  rq  s     r   __and__ValueSet.__and__  rt  r   c                 ,    [        U R                  5      $ r   )r   rb  r4   s    r   __iter__ValueSet.__iter__      DIIr   c                 ,    [        U R                  5      $ r   )boolrb  r4   s    r   __bool__ValueSet.__bool__  r{  r   c                 ,    [        U R                  5      $ r   )lenrb  r4   s    r   __len__ValueSet.__len__  s    499~r   c                 L    SSR                  S U R                   5       5      -  $ )NzS{%s}, c              3   8   #    U  H  n[        U5      v   M     g 7fr   )rW  )r@   ss     r   rB   $ValueSet.__repr__.<locals>.<genexpr>  s     #>IqCFFIs   )joinrb  r4   s    r   r.  ValueSet.__repr__  s     $))#>DII#>>??r   c                 J    U R                  [        XR                  5      5      $ r   )r-  filterrb  )r    filter_funcs     r   r  ValueSet.filter  s    ~~f[))<==r   c                    ^ ^ UU 4S jnU$ )Nc                  V   >^ ^ TR                  U UU4S jTR                   5       5      $ )Nc              3   H   >#    U  H  n[        UT5      " T0 TD6v   M     g 7fr   )r#  )r@   r!   r   r   rd   s     r   rB   7ValueSet.__getattr__.<locals>.mapper.<locals>.<genexpr>  s)      "&E t$d5f5&s   ")rF   rb  )r   r   rd   r    s   ``r   mapper$ValueSet.__getattr__.<locals>.mapper  s%    >> "!YY"  r   r   )r    rd   r  s   `` r   r$  ValueSet.__getattr__  s    	
 r   c                 4    U R                   UR                   :H  $ r   rb  rq  s     r   __eq__ValueSet.__eq__  s    yyEJJ&&r   c                 .    U R                  U5      (       + $ r   )r  rq  s     r   __ne__ValueSet.__ne__  s    ;;u%%%r   c                 ,    [        U R                  5      $ r   )hashrb  r4   s    r   __hash__ValueSet.__hash__  r{  r   c                 :    [        S U R                   5       5      $ )Nc              3   @   #    U  H  oR                  5       v   M     g 7fr   )py__class__)r@   rT   s     r   rB   'ValueSet.py__class__.<locals>.<genexpr>  s     ;Arf   )r.   rb  r4   s    r   r  ValueSet.py__class__  s    ;;;;r   Nc              #      #    SSK Jn  U R                   Vs/ s H  oDR                  XS9PM     nn[	        U6  H"  nU" U Vs/ s H	  owc  M  UPM     sn5      v   M$     g s  snf s  snf 7f)Nr   )get_merged_lazy_valuer  )r~   r  rb  rG   r   )r    rH   rI   r  rT   
type_iterslazy_valuesls           r   rG   ValueSet.iterate  sg     CQUQZQZ[QZAii 3iGQZ
[&
3K''9KqK9  4 \ :s!   A*A A*A%
A%
A*c                 V   ^ [         R                  U4S jU R                   5       5      $ )Nc              3   Z   >#    U  H   oR                   R                  UT5      v   M"     g 7fr   r&   )r@   rT   r%   s     r   rB   #ValueSet.execute.<locals>.<genexpr>  s'     !]S\a"3"3";";Ay"I"IS\s   (+r.   rF   rb  r)   s    `r   r(   ValueSet.execute  s!    !!!]SWS\S\!]]]r   c                 Z   ^^ [         R                  UU4S jU R                   5       5      $ )Nc              3   F   >#    U  H  oR                   " T0 TD6v   M     g 7fr   r3   r@   rT   r   r   s     r   rB   /ValueSet.execute_with_values.<locals>.<genexpr>  s!     !\R[Q"7"7"H"HR[   !r  r   s    ``r   r0   ValueSet.execute_with_values  s!    !!!\RVR[R[!\\\r   c                     [        [        U R                   Vs/ s H  o3R                  " U0 UD6PM     sn/ 5      $ s  snf r   )r   r   rb  r`   )r    r   r   rT   s       r   r`   ValueSet.goto  s3    cTYYGYFFD3F3YGLLGs   <
c                 Z   ^^ [         R                  UU4S jU R                   5       5      $ )Nc              3   F   >#    U  H  oR                   " T0 TD6v   M     g 7fr   )rn   r  s     r   rB   .ValueSet.py__getattribute__.<locals>.<genexpr>  s!     ![QZA"6"6"G"GQZr  r  r   s    ``r   rn   ValueSet.py__getattribute__  s!    !!![QUQZQZ![[[r   c                 Z   ^^ [         R                  UU4S jU R                   5       5      $ )Nc              3   B   >#    U  H  n[        U/TQ70 TD6v   M     g 7fr   )r^  r  s     r   rB   $ValueSet.get_item.<locals>.<genexpr>  s      !R	1(1">t">v">	s   r  r   s    ``r   get_itemValueSet.get_item  s    !!!R		!RRRr   c                     U R                  / 5      nU R                   H  n [        X15      nX$" 5       -  nM     U$ ! [         a     M+  f = fr   )r-  rb  r#  r   )r    function_namer  rT   methods        r   	try_mergeValueSet.try_merge  sW    NN2&	A& 2 VX%	  	 " s   <
A
	A
c                     [         R                  U R                   Vs/ s H  oR                  5       PM     sn5      $ s  snf r   )r.   rF   rb  r9   )r    rT   s     r   r9   "ValueSet.gather_annotation_classes   s0    !!$))"T)Q#>#>#@)"TUU"Ts   >c                 x    U R                    VVs/ s H  oR                  5         H  o"PM     M     snn$ s  snnf r   )rb  r   )r    rT   sigs      r   r   ValueSet.get_signatures  s.    !YYEY2B2B2D32DYEEEs   "6c                 v   U R                    Vs/ s H  o"R                  US9PM     nn[        [        S U5      5      n[	        U5      S:X  a  US   $ SU;   nU(       a  UR                  S5        [	        U5      S:X  a  g [	        U5      S:X  a  US   nOSSR                  U5      -  nU(       a  SU-  nU$ s  snf )N)r     r   Nonez	Union[%s]r  zOptional[%s])rb  r  sortedr  r  remover  )r    r  vt
type_hintsoptionalr  s          r   r  ValueSet.get_type_hint  s    EIYYOY__N_;YOF4O,
z?aa= Z'f%z?a_!1Adii
33A"A# Ps   B6c                 l    SSK Jn  0 nU R                   H  nU" UUR                  U5      5        M     U$ )Nr   )merge_type_var_dicts)!jedi.inference.gradual.annotationr  rb  r  )r    r  r  type_var_dictr!   s        r   r  ValueSet.infer_type_vars  s9    JYYE %%i0 
 r   r  r   r
  ) r   r   r   r   r   r&  rh  rF   rr  rv  ry  r~  r  r.  r  r$  r  r  r  r  rG   r(   r0   r`   rn   r  r  r9   r   r  r  r   r   r   r   r.   r.     s    3
  
 
; 
;==@>'&<^]M\S	VF(
r   r.   c                    ^  U 4S jnU$ )Nc                  &   > [        T" U 0 UD65      $ r   r8   )r   r   funcs     r   wrapper&iterator_to_value_set.<locals>.wrapper+  s    d-f-..r   r   )r  r  s   ` r   iterator_to_value_setr  *  s    / Nr   r   )%r  	functoolsr   r   r   	itertoolsr   parso.python.treer   jedir   jedi.parser_utilsr   jedi.inference.helpersr
   jedi.inference.utilsr   jedi.inference.cacher   
jedi.cacher   objectr   	Exceptionr   r   r   r  r  r(  r3  r=  rH  r^  r.   r   r  r   r   r   <module>r     s      ! "  3 8 . F %8	9 	o1 o1da aH2( 2*"( "I$ IF FU U6H HV RL	r   