
    ^jH                        d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ  e       ZerddlmZ  G d de      Z G d d      Z G d de      Zd$dZ  G d de      Z! G d de!      Z" G d de!      Z# G d de      Z$ G d d      Z%d  Z& G d! d"      Z' e'g       Z(d# Z)y)%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)TYPE_CHECKINGAny)Name)debug)clean_scope_docstringSimpleGetItemNotFound)safe_property)%inference_state_as_method_param_cache)memoize_method)InferenceStatec                       e Zd Zy)HasNoContextN)__name__
__module____qualname__     R/opt/ringagent/.cad-venv/lib/python3.12/site-packages/jedi/inference/base_value.pyr   r      s    r   r   c                       e Zd ZU eed<   ded<   eed<   eed<   eed<   eed<   eed<   eed	<   eed
<   d Zd Zd Zd Zd Z	ddZ
d ZddZ	 	 ddZd Zd ZddZd Zd Zed        Zy)HelperValueMixinparent_contextr   inference_statenameget_filtersis_stubpy__getattribute__alternatives
py__iter__	py__mro___as_contextc                 v    | }|j                   |j                         S 	 |j                   |S |j                   }N)r   
as_context)selfvalues     r   get_root_contextz!HelperValueMixin.get_root_context,   sF    '##%%##+((E r   c                 <    | j                   j                  | |      S )N)	argumentsr   executer'   r+   s     r   r-   zHelperValueMixin.execute6   s    ##++DI+FFr   c                     ddl m}  ||D cg c]  }t        |g       c}      }| j                  j	                  | |      S c c}w )Nr   )ValuesArguments)jedi.inference.argumentsr0   ValueSetr   r-   )r'   
value_listr0   r(   r+   s        r   execute_with_valuesz$HelperValueMixin.execute_with_values9   s@    <#J$O5Xug%6$OP	##++D)<< %Ps   Ac                 "    | j                         S r%   r4   )r'   contexts     r   execute_annotationz#HelperValueMixin.execute_annotation>   s    ''))r   c                     t        | g      S r%   r2   r'   s    r   gather_annotation_classesz*HelperValueMixin.gather_annotation_classesA   s    r   Nc                 Z    t         j                  d | j                  ||      D              S )Nc              3   <   K   | ]  }|j                           y wr%   infer.0
lazy_values     r   	<genexpr>z:HelperValueMixin.merge_types_of_iterate.<locals>.<genexpr>E   s!      "
 "
   r2   	from_setsiterate)r'   contextualized_nodeis_asyncs      r   merge_types_of_iteratez'HelperValueMixin.merge_types_of_iterateD   s.    !! "
"ll+>I"
 
 	
r   c              #      K   t        |t              r|nd }| j                  |      E d {    | j                         r6ddlm}  |t        | h            D ]  }|j                         E d {     y y 7 K7 
w)N)origin_scoper   )convert_values)
isinstancer   r   r   !jedi.inference.gradual.conversionrN   r2   )r'   name_or_strrM   rN   cs        r   _get_value_filtersz#HelperValueMixin._get_value_filtersJ   ss     &0d&C{###>>><<>H#HdV$45 +==?**+  	?
 +s"   *A<A8AA</A:0	A<:A<c                     ddl m} | j                  |      }|j                  ||      }t	        j
                  d|| |       |S )Nr   )finderzcontext.goto %s in (%s): %s)jedi.inferencerU   rS   filter_namer	   dbg)r'   rQ   name_contextanalysis_errorsrU   filtersnamess          r   gotozHelperValueMixin.gotoS   s?    )))+6""7K8		/dEJr   c                 Z   || }| j                  |||      }t        j                  d |D              }|s/t        |t              r|j
                  n|}| j                  |      }|s-|s+|r)t        |t              rddlm} |j                  || |       t        j                  d||       |S )zZ
        :param position: Position of the last statement -> tuple of line, column
        c              3   <   K   | ]  }|j                           y wr%   r?   )rB   r   s     r   rD   z6HelperValueMixin.py__getattribute__.<locals>.<genexpr>b   s     #CTDJJL#CrE   r   analysisz context.names_to_types: %s -> %s)r]   r2   rG   rO   r   r(   r    rV   ra   add_attribute_errorr	   rX   )	r'   rQ   rY   positionrZ   r\   valuesnra   s	            r   py__getattribute__z#HelperValueMixin.py__getattribute__Z   s    
 L		+|_E###CU#CC%/T%B!!A88;FV+t,3,, $5		4eVDr   c                 t    | j                  d      }|st        j                  d|        |j                         S )N	__await__z"Tried to run __await__ on value %s)rf   r	   warningr4   )r'   await_value_sets     r   py__await__zHelperValueMixin.py__await__o   s3    11+>MM>E2244r   c                 .    | j                   j                  S r%   )r   string_namer;   s    r   
py__name__zHelperValueMixin.py__name__u   s    yy$$$r   c                 N   t        j                  d|        |r}ddlm} t	         || j                  d      j                         j                  d      j                         j                  d      j                         j                               g      S | j                  |      S )Nz
iterate %sr   )LazyKnownValues	__aiter__	__anext__rh   )	r	   rX   jedi.inference.lazy_valuerp   iterrf   r4   py__stop_iteration_returnsr!   )r'   rI   rJ   rp   s       r   rH   zHelperValueMixin.iteratex   s    		,%A ++K8LLN++K89L9L9N++K89L9L9N335	   233r   c                 &   t        j                  d| d|d      5  | j                         D ]4  }|j                  |      st        j                  dd        d d d        y t        j                  dd       	 d d d        y# 1 sw Y   y xY w)	Nzsubclass matching of z <=> BLUE)colorzmatched subclass TrueTzmatched subclass FalseF)r	   increase_indent_cmr"   is_same_classrX   )r'   class_valueclss      r   is_sub_class_ofz HelperValueMixin.is_sub_class_of   s    %%$P[&\,24 	~~'  $$[1II5VD	 	  II.f=	 	 	s   %BB%BBc                 z    t        |      j                  t        j                  k7  r|j                  |       S | |k(  S r%   )typerz   r   )r'   class2s     r   rz   zHelperValueMixin.is_same_class   s6    <%%)9)G)GG''--v~r   c                 &     | j                   |i |S r%   )r#   r'   argskwargss      r   r&   zHelperValueMixin.as_context   s    t000r   NF)NT)NNT)r   r   r   r   __annotations__r)   r-   r4   r8   r<   rK   rS   r]   rf   rk   rn   rH   r}   rz   r   r&   r   r   r   r   r   !   s    %%
IL$''ON)G=
* 
+ KO+/*5%4  1 1r   r   c                       e Zd ZdZdZdZdZd"dZd Zd Z	d"dZ
d"dZd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZefdZd Zd Zd Zd Zd Zd Zd Z d Z!d Z"e#d        Z$d#d Z%d! Z&y)$Valuez*
    To be implemented by subclasses.
    Nnot_defined_please_report_bugc                      || _         || _        y r%   )r   r   )r'   r   r   s      r   __init__zValue.__init__   s    .,r   c                 r    ddl m} |j                  |j                  d|j                  d| z         t
        S )Nr   r`   ztype-error-not-subscriptablez+TypeError: '%s' object is not subscriptablemessage)rV   ra   r   r7   node	NO_VALUES)r'   index_value_setrI   ra   s       r   py__getitem__zValue.py__getitem__   s;    +''*$$ADH	 	 	
 r   c                     t         r%   r   )r'   indexs     r   py__simple_getitem__zValue.py__simple_getitem__   s    ##r   c                     |2ddl m} |j                  |j                  d|j                  d| z         t        g       S )Nr   r`   ztype-error-not-iterablez&TypeError: '%s' object is not iterabler   )rV   ra   r   r7   r   rt   )r'   rI   ra   s      r   r!   zValue.py__iter__   sE    */LL#++)#((@4G	  I
 Bxr   c                 $    | j                  |      S r%   )r!   )r'   rI   s     r   
py__next__zValue.py__next__   s    233r   c                     g S r%   r   r;   s    r   get_signatureszValue.get_signatures   s    	r   c                      yr   r   r;   s    r   is_classzValue.is_class       r   c                      yr   r   r;   s    r   is_class_mixinzValue.is_class_mixin   r   r   c                      yr   r   r;   s    r   is_instancezValue.is_instance   r   r   c                      yr   r   r;   s    r   is_functionzValue.is_function   r   r   c                      yr   r   r;   s    r   	is_modulezValue.is_module   r   r   c                      yr   r   r;   s    r   is_namespacezValue.is_namespace   r   r   c                      yr   r   r;   s    r   is_compiledzValue.is_compiled   r   r   c                      yr   r   r;   s    r   is_bound_methodzValue.is_bound_method   r   r   c                      yr   r   r;   s    r   is_builtins_modulezValue.is_builtins_module   r   r   c                      y)z
        Since Wrapper is a super class for classes, functions and modules,
        the return value will always be true.
        Tr   r;   s    r   
py__bool__zValue.py__bool__   s    
 r   c                 x    	 | j                   j                   t        | j                         S # t        $ r Y yw xY w)N )	tree_nodeget_doc_noder
   AttributeErrorr;   s    r   	py__doc__zValue.py__doc__   s9    	9NN'' )88  		s   - 	99c                 2    |t         u rt        d| z        |S )Nz'There exists no safe value for value %s)sentinel
ValueError)r'   defaults     r   get_safe_valuezValue.get_safe_value   s     hFMNNr   c                 >    t        j                  d|| |       t        S )Nz!%s not possible between %s and %sr	   ri   r   )r'   otheroperators      r   execute_operationzValue.execute_operation   s    98T5Qr   c                 :    t        j                  d|        t        S )Nzno execution possible %sr   r.   s     r   
py__call__zValue.py__call__   s    0$7r   c                 :    t        j                  d|        t        S )Nz0Not possible to return the stop iterations of %sr   r;   s    r   ru   z Value.py__stop_iteration_returns   s    H$Or   c                     t         S )zH
        For now a way to add values in cases like __getattr__.
        )r   )r'   rQ   s     r   r    z$Value.py__getattribute__alternatives  s
     r   c                 F    t        j                  d|        t        | g      S )NzNo __get__ defined on %s)r	   ri   r2   )r'   instancer{   s      r   	py__get__zValue.py__get__
  s    0$7r   c                     t         S r%   )NotImplemented)r'   calling_instancer   r{   s       r   py__get__on_classzValue.py__get__on_class  s    r   c                      y r%   r   r;   s    r   get_qualified_nameszValue.get_qualified_names  s    r   c                 6    | j                   j                         S r%   )r   r   r;   s    r   r   zValue.is_stub  s    ""**,,r   c                     t         r%   )r   r;   s    r   r#   zValue._as_context  s    r   c                     t         r%   NotImplementedErrorr;   s    r   r   z
Value.name  s    !!r   c                      y r%   r   )r'   add_class_infos     r   get_type_hintzValue.get_type_hint   s    r   c                     i S )an  
        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_varszValue.infer_type_vars#  s	    6 	r   r%   T)'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   ru   r    r   r   r   r   r#   propertyr   r   r   r   r   r   r   r      s     I J.H-	$49 &. 
 - " "r   r   Nc                 \    t         j                  d | j                  ||      D              S )z
    Calls `iterate`, on all values but ignores the ordering and just returns
    all values that the iterate functions yield.
    c              3   <   K   | ]  }|j                           y wr%   r?   rA   s     r   rD   z!iterate_values.<locals>.<genexpr>F  s!       	rE   rJ   rF   )rd   rI   rJ   s      r   iterate_valuesr   A  s2    
   ..)<x.P  r   c                   F    e Zd Zed        Ze e       d               Zd Zy)_ValueWrapperBasec                     ddl m} | j                  j                  }|j                   || |j                        S ddlm}  || |j                        S )Nr   )	ValueName)CompiledValueName)jedi.inference.namesr   _wrapped_valuer   	tree_namejedi.inference.compiledr   rm   )r'   r   wrapped_namer   s       r   r   z_ValueWrapperBase.nameM  sK    2**//!!-T<#9#9::A$T<+C+CDDr   c                      | |i |S r%   r   )r|   r   r   r   s       r   create_cachedz_ValueWrapperBase.create_cachedW  s     D#F##r   c                 F    |dk7  sJ d       t        | j                  |      S )Nr   zProblem with _get_wrapped_value)getattrr   )r'   r   s     r   __getattr__z_ValueWrapperBase.__getattr__\  s*    ''J)JJ't**D11r   N)	r   r   r   r   r   classmethodr   r   r   r   r   r   r   r   L  s:    E E *,$ - $2r   r   c                   N    e Zd Zeredefd       Zneed               Zd Z	d Z
y)LazyValueWrapperreturnc                      y r%   r   r;   s    r   r   zLazyValueWrapper._wrapped_valuec  s    r   c                 x    t        j                  d      5  | j                         cd d d        S # 1 sw Y   y xY w)NzResolve lazy value wrapper)r	   ry   _get_wrapped_valuer;   s    r   r   zLazyValueWrapper._wrapped_valueg  s4     ))*FG 1..01 1 1s   09c                 4    d| j                   j                  z  S )Nz<%s>)	__class__r   r;   s    r   __repr__zLazyValueWrapper.__repr__m  s    0011r   c                     t         r%   r   r;   s    r   r   z#LazyValueWrapper._get_wrapped_valuep  s    !!r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   a  sD    		C 	 
	 
		1 
 
	12"r   r   c                       e Zd Zd Zd Zy)ValueWrapperc                     || _         y r%   )r   )r'   wrapped_values     r   r   zValueWrapper.__init__u  s
    +r   c                 N    | j                   j                  d| j                  dS )N())r   r   r   r;   s    r   r   zValueWrapper.__repr__x  s    >>22D4G4GHHr   N)r   r   r   r   r   r   r   r   r   r   t  s    ,Ir   r   c                   $     e Zd Z fdZd Z xZS )	TreeValuec                 4    t         |   ||       || _        y r%   )superr   r   )r'   r   r   r   r   s       r   r   zTreeValue.__init__}  s    .9"r   c                 P    d| j                   j                  d| j                  dS )N<: >)r   r   r   r;   s    r   r   zTreeValue.__repr__  s    !^^44dnnEEr   )r   r   r   r   r   __classcell__)r   s   @r   r  r  |  s    #Fr   r  c                   $    e Zd Zd Zd Zd Zd Zy)ContextualizedNodec                      || _         || _        y r%   )r7   r   )r'   r7   r   s      r   r   zContextualizedNode.__init__  s    	r   c                 6    | j                   j                         S r%   )r7   r)   r;   s    r   r)   z#ContextualizedNode.get_root_context  s    ||,,..r   c                 L    | j                   j                  | j                        S r%   )r7   
infer_noder   r;   s    r   r@   zContextualizedNode.infer  s    ||&&tyy11r   c                 j    d| j                   j                  d| j                  d| j                  dS )Nr  r  z in r	  )r   r   r   r7   r;   s    r   r   zContextualizedNode.__repr__  s!    #'>>#:#:DIIt||TTr   N)r   r   r   r   r)   r@   r   r   r   r   r  r    s    /2Ur   r  c                    t         }t               }|D ]a  }|j                  d       }t        |      t        t
        t        t        t        fv r	 || j                  |      z  }Q|j                  |       c |s|s|| j                  t        |      |      z  }t        j                  d|       |S # t        $ r Y Xw xY w)N)r   zpy__getitem__ result: %s)r   setr   r   floatintstrslicebytesr   r   r   r   r2   r	   rX   )r(   index_valuesrI   resultunused_valuesindex_valuer   s          r   _getitemr    s    FEM# 	'**4*8;5#sE599%44U;; 	+&	' L%%%]#
 	
 
II(&1M ) s   B11	B=<B=c                       e Zd Zd Zed        Zed        Zd Zd Zd Z	d Z
d Zd	 Zd
 Zd Zd Zd Zd Zd ZddZd Zd Zd Zd Zd Zd Zd Zd ZddZd Zy)r2   c                 V    t        |      | _        |D ]  }t        |t              sJ  y r%   )	frozenset_setrO   r2   )r'   iterabler(   s      r   r   zValueSet.__init__  s-    h'	 	3E!%222	3r   c                 6    | j                  |       }||_        |S r%   )__new__r!  )r|   
frozenset_r'   s      r   _from_frozen_setzValueSet._from_frozen_set  s    {{3	r   c                     t               }|D ]0  }t        |t              r||j                  z  }#|t	        |      z  }2 | j                  t	        |            S )z7
        Used to work with an iterable of set.
        )r  rO   r2   r!  r   r&  )r|   sets
aggregatedset_s       r   rG   zValueSet.from_sets  sX    
 U
 	.D$)dii'
io-
		.
 ##Ij$9::r   c                 R    | j                  | j                  |j                  z        S r%   r&  r!  r'   r   s     r   __or__zValueSet.__or__       $$TYY%;<<r   c                 R    | j                  | j                  |j                  z        S r%   r,  r-  s     r   __and__zValueSet.__and__  r/  r   c                 ,    t        | j                        S r%   )rt   r!  r;   s    r   __iter__zValueSet.__iter__      DIIr   c                 ,    t        | j                        S r%   )boolr!  r;   s    r   __bool__zValueSet.__bool__  r4  r   c                 ,    t        | j                        S r%   )lenr!  r;   s    r   __len__zValueSet.__len__  s    499~r   c                 L    ddj                  d | j                  D              z  S )NzS{%s}, c              3   2   K   | ]  }t        |        y wr%   )r  )rB   ss     r   rD   z$ValueSet.__repr__.<locals>.<genexpr>  s     #>qCF#>s   )joinr!  r;   s    r   r   zValueSet.__repr__  s     $))#>DII#>>??r   c                 L    | j                  t        || j                              S r%   )r   filterr!  )r'   filter_funcs     r   rA  zValueSet.filter  s    ~~f[$))<==r   c                       fd}|S )Nc                  T     j                   fdj                  D              S )Nc              3   B   K   | ]  } t        |      i   y wr%   )r   )rB   r(   r   r   r   s     r   rD   z7ValueSet.__getattr__.<locals>.mapper.<locals>.<genexpr>  s,      " %t$d5f5"   )rG   r!  )r   r   r   r'   s   ``r   mapperz$ValueSet.__getattr__.<locals>.mapper  s%    >> "!YY"  r   r   )r'   r   rG  s   `` r   r   zValueSet.__getattr__  s    	
 r   c                 4    | j                   |j                   k(  S r%   )r!  r-  s     r   __eq__zValueSet.__eq__  s    yyEJJ&&r   c                 &    | j                  |       S r%   )rI  r-  s     r   __ne__zValueSet.__ne__  s    ;;u%%%r   c                 ,    t        | j                        S r%   )hashr!  r;   s    r   __hash__zValueSet.__hash__  r4  r   c                 :    t        d | j                  D              S )Nc              3   <   K   | ]  }|j                           y wr%   )py__class__)rB   rR   s     r   rD   z'ValueSet.py__class__.<locals>.<genexpr>  s     ;A;rE   )r2   r!  r;   s    r   rQ  zValueSet.py__class__  s    ;;;;r   Nc              #      K   ddl m} | j                  D cg c]  }|j                  ||       }}t	        | D ]  } ||D cg c]  }||	 c}        y c c}w c c}w w)Nr   )get_merged_lazy_valuer   )rs   rS  r!  rH   r   )r'   rI   rJ   rS  rR   
type_iterslazy_valuesls           r   rH   zValueSet.iterate  sn     CQUQZQZ[Aaii 3hiG[
[&
3 	K''9q1=9 	 \ :s!   A&AA&A!
A!
A&c                 T    t         j                  fd| j                  D              S )Nc              3   V   K   | ]   }|j                   j                  |       " y wr%   r,   )rB   rR   r+   s     r   rD   z#ValueSet.execute.<locals>.<genexpr>  s$     !]a!"3"3";";Ay"I!]s   &)r2   rG   r!  r.   s    `r   r-   zValueSet.execute  s!    !!!]SWS\S\!]]]r   c                 X    t         j                  fd| j                  D              S )Nc              3   B   K   | ]  } |j                   i   y wr%   r6   rB   rR   r   r   s     r   rD   z/ValueSet.execute_with_values.<locals>.<genexpr>  s$     !\Q"7!"7"7"H"H!\rF  rY  r   s    ``r   r4   zValueSet.execute_with_values  s!    !!!\RVR[R[!\\\r   c                 ~    t        t        | j                  D cg c]  } |j                  |i | c}g       S c c}w r%   )r   r   r!  r]   )r'   r   r   rR   s       r   r]   zValueSet.goto  s3    cTYYGFAFFD3F3GLLGs   :
c                 X    t         j                  fd| j                  D              S )Nc              3   B   K   | ]  } |j                   i   y wr%   )rf   r\  s     r   rD   z.ValueSet.py__getattribute__.<locals>.<genexpr>  s$     ![A"6!"6"6"G"G![rF  rY  r   s    ``r   rf   zValueSet.py__getattribute__  s!    !!![QUQZQZ![[[r   c                 X    t         j                  fd| j                  D              S )Nc              3   <   K   | ]  }t        |gi   y wr%   )r  r\  s     r   rD   z$ValueSet.get_item.<locals>.<genexpr>  s      !R1(1">t">v">!Rs   rY  r   s    ``r   get_itemzValueSet.get_item  s    !!!R		!RRRr   c                     t        g       }| j                  D ]  }	 t        ||      }| |       z  } |S # t        $ r Y )w xY wr%   )r2   r!  r   r   )r'   function_namer   rR   methods        r   	try_mergezValueSet.try_merge  sY    RL	 	&A& M2 VX%		& 	 " s   6	AAc                     t         j                  | j                  D cg c]  }|j                          c}      S c c}w r%   )r2   rG   r!  r<   )r'   rR   s     r   r<   z"ValueSet.gather_annotation_classes  s.    !!$))"TQ1#>#>#@"TUU"Ts   <c                 p    | j                   D cg c]  }|j                         D ]  }|  c}}S c c}}w r%   )r!  r   )r'   rR   sigs      r   r   zValueSet.get_signatures  s/    !YYE!2B2B2DE3EEEEs   2c                 \   | j                   D cg c]  }|j                  |       }}t        t        d |            }t	        |      dk(  r|d   S d|v }|r|j                  d       t	        |      dk(  ry t	        |      dk(  r|d   }nddj                  |      z  }|rd|z  }|S c c}w )N)r      r   Nonez	Union[%s]r<  zOptional[%s])r!  r   sortedrA  r9  remover?  )r'   r   vt
type_hintsoptionalr>  s          r   r   zValueSet.get_type_hint  s    EIYYOQ__N_;OOF4O,
z?aa= Z'f%z?a_!1Adii
33A"A# Ps   B)c                 h    ddl m} i }| j                  D ]  } |||j                  |              |S )Nr   )merge_type_var_dicts)!jedi.inference.gradual.annotationrt  r!  r   )r'   r   rt  type_var_dictr(   s        r   r   zValueSet.infer_type_vars-  s>    JYY 	E %%i0	
 r   r   r   )r   r   r   r   r   r&  rG   r.  r1  r3  r7  r:  r   rA  r   rI  rK  rN  rQ  rH   r-   r4   r]   rf   rb  rf  r<   r   r   r   r   r   r   r2   r2     s    3
  
 
; 
;==@>'&<^]M\S	VF(
r   r2   c                       fd}|S )Nc                  &    t         | i |      S r%   r:   )r   r   funcs     r   wrapperz&iterator_to_value_set.<locals>.wrapper>  s    d-f-..r   r   )ry  rz  s   ` r   iterator_to_value_setr{  =  s    / Nr   r   )*r   	functoolsr   r   r   	itertoolsr   typingr   r   parso.python.treer   jedir	   jedi.parser_utilsr
   jedi.inference.helpersr   jedi.inference.utilsr   jedi.inference.cacher   
jedi.cacher   objectr   rV   r   	Exceptionr   r   r   r   r   r   r   r  r  r  r2   r   r{  r   r   r   <module>r     s      ! % "  3 8 . F %8-	9 	y1 y1xa aH2( 2*"( "&I$ IF FU U6H HV RL	r   