+
    e                     V   R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	H
t
HtHtHt ^ RIHt ^ RIHt ^ RIH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!H"t"H#t# ^ RI$H%t% ^ RI&H't' ^ RI(H)t) ^ RI*H+t+ ^ RI,H-t- ^ RI.H/t/ ^ RI0H1t1 ^ RI2H3t3 RRRRRRRR R!R"R#R$R%R&R'R(R)R*R+R,R-R.R/R0R1R2/t4]4Pk                  4        U Uu/ uF  w  rV R3VR4,          ,           bK  	  upp t6R5 t7R6 t8R7 t9]'! ]
R87      R9 4       t:]Pv                  ]7R: 4       4       t<R; t=R< t>]7ROR= l4       t?]Pv                  ROR> l4       t@R? tA]R@ 4       tBRA tCRB tDRC tERD tFRE tGRF tHRG tIRH tJ]3P                  ! 4       RI 4       tL]'! 4       RJ 4       tMRK tN ! RL RM]4      tORN tPR# u upp i )Pz&
Functions inferring the syntax tree.
N)tree)debug)parser_utils)ValueSet	NO_VALUESContextualizedNodeiterator_to_value_setiterate_values)LazyTreeValue)compiled)	recursion)analysis)imports)	arguments)
ClassValueFunctionValue)iterable)ListModificationDictModification)TreeInstance)	is_string
is_literal	is_numberget_names_of_nodeis_big_annoying_library)COMPARISON_OPERATORS)inference_state_method_cache)VersionInfo)
annotation)TreeNameDefinition)CompForContext)	Decoratee)plugin_manager+__add__-__sub__*__mul__@
__matmul__/__truediv__z//__floordiv__%__mod__**__pow__z<<
__lshift__z>>
__rshift__&__and__|__or__^__xor____r:   NNc                   a  V 3R lpV# )ac  
This is for now the way how we limit type inference going wild. There are
other ways to ensure recursion limits as well. This is mostly necessary
because of instance (self) access that can be quite tricky to limit.

I'm still not sure this is the way to go, but it looks okay for now and we
can still go anther way in the future. Tests are there. ~ dave
c                   < V P                   pV P                  p VP                  V;;,          ^,          uu&   RpV P                  f(   V P	                  4       VP
                  J d
   V^d,          pVP                  V,          V8  d   \        P                  ! RV4       \        #  S! V .VO5/ VB #   \         d    ^TP                  T&    L(i ; i)   i,  z+In value %s there were too many inferences.)
	tree_nodeinference_stateinferred_element_countsparent_context	get_valuebuiltins_moduler   warningr   KeyError)contextargskwargsnr@   maximumfuncs   &*,   </usr/lib/python3/dist-packages/jedi/inference/syntax_tree.pywrapper$_limit_value_infers.<locals>.wrapper@   s    !11	;33A6!;6G%%-))+/N/NN
 366q9GCKQO   D
 G-d-f--  	;9:O33A6	;s   B
B3 3CC )rL   rN   s   f rM   _limit_value_infersrQ   7   s    .* N    c                   a \        V \        4      '       d   \        W4      # TpVe@   VP                  pVP                  R9   d   M!\
        P                  ! V4      '       g   K@  R p V P                  P                  V4      pVEf3   V'       Ed*   VP                  R8X  Ed   V P                  P                  '       Ed   VP                  ^,          p/ .pVP                  VP                  8  Edi   \        V4      p\        V4      pV Uu. uF  qP                  NK  	  upo\         ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       d   V F  p	V P                  P#                  W	4      p
\%        V
4      ^8  d   \%        V4      \%        V
4      ,          ^8  d   \&        P(                  ! RV4       / .p M\+        V4      p. pV
 F[  p\+        V4      p\-        V4       F6  w  rVP/                  4       W&   \1        V.4      W,          V	P                  &   K8  	  W],          pK]  	  K  V F  pWV	P                  &   K  	  K  	  \%        V4      ^8  dF   \2        pV F7  pV P5                  W/4      ;_uu_ 4        V\        W4      ,          pR R R 4       K9  	  V# \7        W4      # V'       d   \        W4      # \7        W4      # u upi   + '       g   i     K|  ; i)Nif_stmtc              3   @   <"   T F  qP                   S9   x  K  	  R # 5iNvalue).0istr_element_namess   & rM   	<genexpr>infer_node.<locals>.<genexpr>v   s     BA77//s   TFz,Too many options for if branch inference %s.)rT   for_stmt)
isinstancer    _infer_nodeparenttyper   is_scopepredefined_namesgetr@   is_analysischildren	start_posend_posr   rX   anyinferlenr   dbglist	enumeratecopyr   r   predefine_names_infer_node_if_inferred)rG   elementrT   predefined_if_name_dictif_stmt_test
name_dictsif_nameselement_nameseif_namedefinitionsoriginal_name_dicts
definitionnew_name_dictsrZ   	name_dictresultr[   s   &&               @rM   
infer_noder   X   sy   '>**7,,G

..<<22  ))G%66::7C &77	)g.E.E.Q.Q.Q''*T

 |333 )6H-g6M2? @-Q- @sBBsssBBBB'G")"9"9"?"?"QK ;'!+z?S-==B!II&TV]^ +-J!.2:.>+%'
*5J-12E-FN09.0I4=NN4D 1CKZLCY 1'-- @ 1J '8J +6 *4I7Bgmm4 *41  (4 z?QF'	,,W@@k';;F A@ ( M*7<<"w00*7<<Q !A> A@@s   KKK.c                    TpVe9   VP                   pV P                  P                  V4      pVf   K1  \        W4      # \	        W4      # )z9
TODO This function is temporary: Merge with infer_node.
)ra   rd   re   r`   _infer_node_cached)rG   rs   ra   rt   s   &&  rM   rr   rr      sK     F

")":":">">v"F".w00g//rR   )defaultc                     \        W4      # rV   )r`   )rG   rs   s   &&rM   r   r      s    w((rR   c                 |   \         P                  ! R WP                  V 4       V P                  pVP                  pVR9   d   \        W4      # VR8X  d!   \        \        P                  ! W4      .4      # VR8X  d   \        W4      # VR9   d   VP                  ^ ,          pVP                  R,          pRpVP                  R8X  d%   VP                  R8X  d   RpVP                  ^ 4      pV P                  V4      p\        V4       FF  w  rV	R8X  d/   V P                  WX^,           ,          4      p
\        V VV	V
4      p M\!        WV	4      pKH  	  V'       d   VP#                  4       P%                  4       # V# VR9   d"   \        \&        P(                  ! W V4      .4      # VR9   dF   V P                  VP                  R,          4      pVP                  R	R  F  p\+        W{4      pK  	  V# VR
8X  dJ   V P                  VP                  ^ ,          4      V P                  VP                  R,          4      ,          # VR8X  df   VP                  R8w  d4   VP,                  p\/        R\1        VP                  4      : RV: R24      h\        \2        P4                  ! VR4      .4      # VR8X  dK   \        WP                  ^ ,          4      pVP                  R,           F  pVP7                  WR7      pK  	  V# VR8X  d#   V P                  VP                  ^ ,          4      # VR8X  d6   \8        P:                  ! WP                  ^,          4      P=                  4       # VR8X  d   \?        VP                  4      '       d   VP                  ^,          P                  R8X  dc   VP                  ^,          P                  ^,          pV P                  V4      P7                  R4      PA                  4       pVP%                  4       # \B        # VR8X  d#   V P                  VP                  ^,          4      # \E        W4      # )zinfer_node %s@%s in %skeywordlambdef	expr_stmtr>   NNFawaitTr0   Ntestoperatorz...zunhandled operator z in  Ellipsisdotted_name:r;   Nr;   )name_context
eval_input	annassign
yield_expr	yield_arg__iter__namedexpr_test)namenumberstringatomstringsr   fstring)power	atom_expr)testlist_star_exprtestlist)not_testfactor)#r   rm   rh   r@   rb   
infer_atomr   r   from_contextinfer_expr_stmtrg   rX   popr   ro   _infer_comparisoninfer_trailerpy__await__py__stop_iteration_returnsr   SequenceLiteralValueinfer_factorra   AssertionErrorreprr   builtin_from_namepy__getattribute__r   infer_annotationexecute_annotationrl   execute_with_valuesr   infer_or_test)rG   rs   r@   typfirst_childrg   	had_await	value_setrZ   trailerrightr   origin	next_name
generatorss   &&             rM   r`   r`      s    
II&1B1BGL--O
,,C
SS'++			33GEFGG		w00	&	&&&q)##B'	y([->->'-II",,q/K&&{3	%h/LQ$**8E?;-		 %g'BI 0 ((*EEGG	3	366QXYZ[[	&	&&&w'7'7';<	(("-H$Y9I .	""7#3#3A#67$$W%5%5b%9:; 	<	
	==E!^^F 4CVX^!_``33OZPQRR		w(8(8(;<	 ))$//I!44Y4UI 0		!!'"2"21"566		**74D4DQ4GH!	"		w  W%5%5a%8%=%=%L&&q)2215G ++G4##J/0C0C0E 88:: 	 	 !!'"2"21"566W..rR   c                    VP                   R ,          w  r4VR8X  d   RpVR8X  d4   VP                   w  r4pVP                  \        W4      \        W4      4      # \        P
                  ! RW!4       VR8X  d   VP                  V VR7      # VR8X  g   Q RV,          4       h\        P                  ! V P                  WV4      pVP                  V4      # )	:Nr;   N)N[zinfer_trailer: %s in %s.)r   name_or_str(ztrailer_op is actually %s)rg   get_item_infer_subscript_listr   r   rm   r   r   TreeArgumentsr@   execute)rG   atom_valuesr   
trailer_opnode_rH   s   &&&    rM   r   r     s    ''+Js{S%..
!##!'0w0
 	

 			+WB11$  2  
 $N&AJ&NN$**7+B+BGSZ[D&&t,,rR   c                  a V P                   pSP                  R8X  d   \        P                  ! SRRR4      ;'       g    SpVP                  R8X  d`   \        ;QJ d-    V3R lVP                  4        4       F  '       g   K   RM"	  RM! V3R lVP                  4        4       4      '       g   SpMVP                  R8X  d   SpVP                  p\        S4      '       d   RpV P                  SVR	7      # SP                  R
8X  db   SP                  R9   d,   \        \        P                  ! VSP                  4      .4      # SP                  R8X  d   \        # Q RS,          4       h\        S\        P                  4      '       dF   VP                   P#                  SP                  4      p\        \        P$                  ! W%4      .4      # SP                  R8X  dR   \'        V SP(                  ^ ,          4      pSP(                  R,           F  p\'        W4      p\+        WRV4      pK  	  V# SP                  R8X  d   \        P,                  ! V4      # SP(                  pV^ ,          R8X  db   \/        V4      ^8X  gR   V^,          P                  R8X  d"   \/        V^,          P(                  4      ^8  g   V P1                  V^,          4      #  V^,          P(                  ^,          p	V	R8X  d    V^,          P(                  ^,          p	V	P                  R9   d"   \        \4        P6                  ! W S4      .4      #  V^,          p
 V
P(                  pV^ ,          R8X  d.   V
R8X  g   RV9   g   RV9   d   \4        P:                  ! W S4      pM\4        P<                  ! W S4      p\        V.4      #   \2         d     Li ; i  \2        \8        3 d     Li ; i  \8         d    . p Li ; i)z
Basically to process ``atom`` nodes. The parser sometimes doesn't
generate the node (because it has just one child). In that case an atom
might be a name or a literal as well.
r   r   r   rT   c              3      <"   T F8  qP                   SP                   u;8*  ;'       d    VP                  8  Mu x  K:  	  R # 5irV   )rh   ri   )rY   rJ   r   s   & rM   r\   infer_atom.<locals>.<genexpr>%  s-     `J_Q{{dnn@@qyy@@J_s   A ATFNpositionr   yieldzCannot infer the keyword %sr   r   r#   r   r   testlist_comp:{}r0   )FalseTrueNone)comp_forsync_comp_for)r@   rb   r   search_ancestorrj   get_test_nodesrh   _is_annotation_namer   rX   r   r   r   r   r_   Literalcompiled_subprocesssafe_literal_evalcreate_simple_objectr   rg   r   get_string_value_setrl   r   
IndexErrorr   comprehension_from_atomAttributeErrorDictLiteralValuer   )rG   r   statestmtr   r   r   r   cr   
array_nodearray_node_c	new_values   &f           rM   r   r     sM    ##EyyF##D+y)LTTPT99	!3`$J]J]J_`333`$J]J]J_```YY)#D>>t$$ H))$)BB	i	::22X77tzzJKLLZZ7" :3d::u	D$,,	'	'**<<TZZH66uEFGG	i	wa(89	mmB''Fw/E)'c5II ( 	i	,,U33MMQ43;s1v{1o5 1/!3%%ad++	t}}Q'H 3 t}}Q/H }} ==!A!AD" !   > qT
	%..L Q43;J#-1D#|3 11%$GI 55edKI$$' "  N+ 		&  	L	s6   O 5N6 O 6OOOOO.-O.c                 >   \         P                  ! V P                  V4      ;_uu_ 4       pV'       dF   Ve,   \        P                  ! WV4      pV'       d   VuuR R R 4       # \        WV4      uuR R R 4       #  R R R 4       \        #   + '       g   i     \        # ; irV   )r   execution_allowedr@   r   "find_type_from_comment_hint_assign_infer_expr_stmtr   )rG   r   	seek_nameallowedpep0484_valuess   &&&  rM   r   r   o  s    		$	$W%<%<d	C	Cw$AA'QZ[ !) 
D	C $G9= 
D	C 
D  
D	C s   -B"BB	c           	       a aaa R p\         P                  ! RW4       VP                  4       pS P                  V4      oV'       d   \	        S V4      p\        VS4      o\        VP                  4       R4      pV! V4      w  poVR9  ;'       d    VP                  R8H  pV'       g
   V'       Ed   VP                  RR7      ^ ,          P                  p	S P                  WP                  R7      p
V'       d    V VV3R lo\        V3R	 lV
 4       4      oEME\        P                  ! V4      pVP                  RR Vn
        \        P                   ! VR
4      pVe   VP                  R
8X  d   S'       d   \"        P$                  ! V4      '       d   VP'                  4       p\)        S V4      p\+        VP-                  4       P/                  V4      4      pV Fq  pVP0                  ^,          P                  VP-                  4       /pS P3                  VV4      ;_uu_ 4        S P                  V4      p\5        S WV4      p
RRR4       Ks  	  V
oM\5        S WS4      o\         P                  ! RS4       S#   + '       g   i     K  ; i)a  
The starting point of the completion. A statement always owns a call
list, which are the calls, that a statement does. In case multiple
names are defined in the statement, `seek_name` returns the result for
this name.

expr_stmt: testlist_star_expr (annassign | augassign (yield_expr|testlist) |
                 ('=' (yield_expr|testlist_star_expr))*)
annassign: ':' test ['=' test]
augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' |
            '<<=' | '>>=' | '**=' | '//=')

:param stmt: A `tree.ExprStmt`.
c                 F   V P                   ^ ,          pVP                  R9  d   R# VP                   ^ ,          pVP                  R8w  g   \        VP                   4      ^8w  d   R# VP                   R,          pVP                   ^ ,          R8H  VP                   ^,          3# )    r   r   )r   r   )FNr   )rg   rb   rl   )r   r   r   r   s   &   rM   check_setitem'_infer_expr_stmt.<locals>.check_setitem  s    MM!$	>>!77!!!$99#i&8&8"9Q">$$R("c)7+;+;A+>>>rR   zinfer_expr_stmt %s (%s)Nr   T)include_setitemr   c                    < \        SS4      pV P                  R 8X  d   \        V SV4      # V P                  R8X  d   \        V SV4      # V # )dictrn   )ContextualizedSubscriptListNode
array_typer   r   )vr   rG   subscriptlistr   s   & rM   to_mod _infer_expr_stmt.<locals>.to_mod  sJ    3G]K<<6)+Ay!<<\\V++Ay!<<rR   c              3   4   <"   T F  pS! V4      x  K  	  R # 5irV   rP   )rY   r   r  s   & rM   r\   #_infer_expr_stmt.<locals>.<genexpr>  s      @KqKs   r^   zinfer_expr_stmt result %s)=Nr   )r   rm   get_rhsr   r   check_tuple_assignmentsnextyield_operatorsrb   get_defined_namesrX   r   rh   r   rp   r   r   r   for_stmt_defines_one_nameget_testlistr   rn   rk   iteraterg   rq   r   )rG   r   r   r   rhsrJ   first_operator
is_setitemis_annassignr   left_valuesr   r^   r   cnordered
lazy_valuedcttr  r  r   s   f&&                @@@rM   r   r   }  s    ? 
II'9
,,.C""3'Iw	2+Ay9	$..0$7N -d 3J!4ZZ9L9LPZ9ZLzz%%d%;A>DD000O ! @K @@Iyy0H%^^CR0HN++D*=H#(C	$>>xHH  ,,.'6rxxz11"56")J#,,Q/55z7G7G7IJC 003??#..s3&7XY&Z @? #*
 (	-g{iX		II)95 @??s   "I66Jc           	         \        VP                  4      pV P                  \        V4      4      pV F  p\        V4      pVP                  R 8X  d#   RP                  R VP                   4       4      pVR9   d]   \        R V 4       4      pVR08X  d   VR8X  d   V P                  V4      pK|  K~  VR08X  d   VR8w  d   V P                  V4      pK  K  K  \        WVV P                  V4      4      pK  	  \        P                  ! RV4       V# )	comp_opr   c              3   8   "   T F  qP                   x  K  	  R # 5irV   rW   )rY   r   s   & rM   r\    infer_or_test.<locals>.<genexpr>  s     C1BA1Bs   andc              3   @   "   T F  qP                  4       x  K  	  R # 5irV   )
py__bool__)rY   lefts   & rM   r\   r    s     A54__..5   TFzinfer_or_test types %s)r  or)
iterrg   r   r	  rb   joinsetr   r   rm   )rG   or_testiteratortypesr   r   
left_boolss   &&     rM   r   r     s   G$$%HtH~.EX==I%xxC1B1BCCH }$A5AAJdV#u$#..u5E %w&u$#..u5E % '
 &gh&-&8&8&?AE! $ 
II&.LrR   c              #    "   V  F}  pVR8X  d(   \        V4      '       d   VP                  4       x  K/  K1  VR8X  dB   VP                  4       pVf    R# \        P                  ! VP
                  V'       * 4      x  Ky  Vx  K  	  R# 5i)z.
Calculates `+`, `-`, `~` and `not` prefixes.
r%   notN)r   negater  r   r   r@   )r   r   rX   bs   &&  rM   r   r     sr     
 s?lln$    "Ay//0E0E1uMMK s   BBc                     \         pV Fi  p\        V4      '       dC   \        P                  ! WP                  P
                  4      pW$P                  4       ,          pKV  V\        V.4      ,          pKk  	  V# rV   )r   r   r   r   r   string_namer   r   )r@   r   
new_resultr   clss   &&   rM   _literals_to_typesr2    sa     Jc?? ,,_hh>R>RSC1133J(C5/)J  rR   c                   a aaa S P                   o\        S\        4      '       d   SpM\        SP                  4      pV'       d	   S'       g2   T;'       g    \        S;'       g    \        ,          p\        SV4      # VR 8X  d}   \        ;QJ d1    R \        P                  ! VS4       4       F  '       d   K   RM&	  RM"! R \        P                  ! VS4       4       4      '       d   \        P                  ! VS34      # \        V4      \        S4      ,          ^8  d   \        SVS,          4      # \        P                  ! V VVV3R lV 4       4      # )r6   c              3   r   "   T F-  pVP                  4       ;'       g    VP                  4       x  K/  	  R # 5irV   )is_classis_compiled)rY   rX   s   & rM   r\   $_infer_comparison.<locals>.<genexpr>  s2      %?E 	//E--//?s   77FTc           	   3   T   <"   T F  pS F  p\        SSVSV4      x  K  	  K  	  R # 5irV   )_infer_comparison_part)rY   r   r   rG   r   right_valuesr   s   &  rM   r\   r7    s6      &'D)E 'ugtXuMM) N's   %()r@   r_   strrX   r   r2  all	itertoolschainr   	from_setsrl   )rG   r  r   r:  operator_strr   r   s   f&ff  @rM   r   r     s	   ##E(C  8>>*l**|/H/HyI!%00		 %__[,?% %__[,?% " "
 !!;"=>>
 {c,//!3%e[<-GHH%% &'&  rR   c                    \         P                  ! V R RR4      pVf   R# VP                  R9   dH   VP                  pVe5   VP                  V P                  u;8*  ;'       d    VP
                  8  # u #  R# VP                  R8X  dw   VP                  p\        V4      ^8  d[   V^,          P                  R8X  dC   V^,          P                  V P                  u;8*  ;'       d    V^,          P
                  8  # u # R# )paramfuncdefr   Fr   )rB  rC  )r   r   rb   r   rh   ri   rg   rl   )r   ancestorannr   s   &   rM   r   r   #  s    ##D'9kJH}},,!!?==DNN@@S[[@@@@  	 
+	%q6A:!A$)){2Q4>>T^^BBadllBBBBrR   c                      V P                   R 8H  # )rn   r   rW   s   &rM   _is_listrH  3  s    v%%rR   c                      V P                   R 8H  # )tuplerG  rW   s   &rM   	_is_tuplerK  7  s    w&&rR   c                 B    \         P                  ! V \        V4      4      # rV   )r   r   r;  )r@   bool_s   &&rM   _bool_to_valuerN  ;  s    %%os5zBBrR   c                 ^   \        V \        P                  4      '       g   R # . pV P                  4        Fa  p\        V\        4      '       g    R # VP
                  pVP                  R8w  d    R #  VP                  \        VP                  4      4       Kc  	  V#   \         d      R # i ; i)Nr   )r_   r   r   
py__iter__r
   datarb   appendintrX   
ValueError)rX   numbersr  r   s   &   rM   _get_tuple_intsrV  ?  s    eX::;;G&&(
*m4499 	NN3tzz?+ ) N  		s   2$BB,+B,c                 6   \        V4      p\        V4      p\        V\        4      '       d   TpM\        VP                  4      pVR 8X  d}   \        V\        P
                  4      '       g   \        V4      '       d   \        V.4      # \        V\        P
                  4      '       g   \        V4      '       d   \        V.4      # EM+VR8X  d   V'       d	   V'       g#   \        V4      '       d#   \        V4      '       d   VP                  WG4      # \        V4      '       d   \        V4      '       g#   \        V4      '       d4   \        V4      '       d#   \        \        P                  ! WV34      .4      # EMyVR8X  d$   V'       d   V'       d   VP                  WG4      # EMOVR8X  d   \        V.4      # V\        9   Ed$   VP                  4       '       d3   VP                  4       '       d   VP                  WG4      pV'       d   V# MVR
9   d5   \        V,          p	V	! W$4      p
VR9   V
8X  d   \        \        W
4      .4      # \        V\        4      '       dj   \!        V4      pVe[   \"        P$                  P                  V,          ! V P&                  P(                  \+        V4      4      p\        \        W4      .4      # \        \        V R4      \        V R4      .4      # VR9   d   \,        # R pVR9   dF   WV8w  d@   V! V4      '       g2   V! V4      '       g$   Rp\.        P0                  ! VRVWV3,          4       VP3                  4       '       g   VP3                  4       '       d   \,        # \4        V,          pVP7                  V4      pV'       d   VP9                  V4      pV'       d   V# V'       g:   \:        V,          pVP7                  V4      pVP9                  V4      pV'       d   V# \        W$.4      p\<        P>                  ! R	W84       V# )r'   r#   r%   r.   TFc                d    \        V \        4      ;'       d    V P                  P                  R9   # )z4Checks if a Jedi object is either a float or an int.)rS  float)r_   r   r   r/  )objs   &rM   check%_infer_comparison_part.<locals>.check  s.    #|, 5 5HH  $44	5rR   z7TypeError: unsupported operand type(s) for +: %s and %sztype-error-operationz Used operator %s resulting in %s)isz!===zis not)r]  r^  )inznot in)r#   r%   ) r   r_   r;  rX   r   Sequencer   r   execute_operationrH  rK  MergedArrayr   r6  rN  r   rV  r   accessenvironmentversion_inforJ  r   r   addr5  operator_to_magic_methodr   r    reverse_operator_to_magic_methodr   rm   )r@   rG   r   r   r   l_is_numr_is_numstr_operatorr   	operationrM  re  bool_resultr[  messagemethod_namemagic_methodsreverse_method_names   &&&&&             rM   r9  r9  P  sL   HH(C  8>>*sdH--..)D//TF##x0011Yu5E5EUG$$ 6F		IdOO	%8H8H))%>>d^^9T??yQVGWGWX11/%=QRSS		))%>>		 	-	-%"3"3"5"5++E@F  ;;0>	!$. !L0U:#^O%K$LMM$,,.u5+"*//"F"Fx"P'33@@l+#K $^O%Q$RSS?D1?E2
  	 
)	)5 z!h&:4[[E%LLKW4he},	. }}%..***<8K++K8M2259M>|L001DE2248Mtm$F	II0(CMrR   c                    \         pVP                  4       P                  pVe   VP                  4       P	                  VP
                  . 4      pRpV F  pVP                  pVP                  R8X  g   K"  VP                  ^,          P                  R8X  g   KF  \        P                  ! V4      VP                  8H  p	V	'       g   Ks  RpV\        P                  ! WP                  ^,          P                  ^,          4      P                  4       ,          pK  	  V'       d   V# . p
VP                  RRR7      pVf   VP                  pVP                  R8X  d   VP                  V4      pVP!                  4       '       d   \         # \#        VP%                  4       4      pVP	                  VP
                  4      p\&        P(                  ! R V 4       4      # VP                  R9  d   VP                  V4      p\+        W4      # VP                  pVR8X  d"   \        P,                  ! WV4      p
V
'       d   V
# VR	8X  d"   \        P.                  ! WV4      p
V
'       d   V
# VR9   d(    VP0                  V,          VP
                  ,          p
V
# VR8X  d   \?        WV4      p
V
# VR	8X  d   VPA                  VPC                  V4      4      pVP                  P                  R
8X  d@   VPE                  R4      pVPG                  4       pVPI                  4       PK                  4       # VPE                  R4      pVPG                  4       # VR9   d   \L        PN                  ! W4      p
V
# VR9   d   \Q        W4      p
V
# VR8X  d@   VPA                  VPS                  4       PS                  4       4      pVPG                  4       p
V
# VR8X  d	   \         p
V
# VR8X  d	   \         p
V
# VR8X  d   \A        W4      p
V
# \U        RV,          4      h  \2         dk    \5        YP                  ^,          4      p\7        TP9                  4       TTP                  P                  R
8H  R7      p\;        Y4      p\=        TT4      p
 T
# i ; i)NFr   r   T)import_name_alwaysr   global_stmtc              3   @   "   T F  qP                  4       x  K  	  R # 5irV   )rk   )rY   r   s   & rM   r\   &tree_name_to_values.<locals>.<genexpr>  s     %Eutjjllur!  r^   	with_stmt
async_stmt)contextualized_nodeis_async
__aenter__	__enter__try_stmtrB  del_stmtr   zShould not happen. type: %s)import_fromimport_name)r^   r   r   )rC  classdef)+r   get_root_contextr?   get_used_namesre   rX   ra   rb   rg   r   get_parent_scoper   r   r   get_definitioncreate_context	is_moduler	  get_filtersr   r?  r   find_type_from_comment_hint_for find_type_from_comment_hint_withrd   rF   r   r	   rk   r   r  r   r   get_test_node_from_namer   r   r   r   r   infer_import_apply_decoratorsget_previous_siblingrT  )r@   rG   	tree_namer   module_nodenamesfound_annotationr   r   correct_scoper(  r   r   filterr   r  	for_typesrJ   value_managersenter_methodscoro
exceptionss   &&&                   rM   tree_name_to_valuesr    s   I**,66K**,00"E DI~~,1C1CA1F1K1K{1Z , = =d CwGXGX X ='+$!<!<!3!3A!6!?!?!B"((*+I  E##tT#RD|99%&&y1A{{}} !  !--/*FJJy/E%%%Eu%EEEYY<<&&y1Aa++
))C
j::7)TL
k;;G9UL
77
	:,,T29??CER L? 
	y9< L; 
	 ++D,H,H,ST;;|+ +==lKM 446D##%@@BB&99+F0022	.	.$$W8" L! 
'	'!'0 L 

	 ''	(F(F(H(](](_`
..0 L 
 L 

	
 L	 
 	 7) L 6<==O  	:#G]]1-=>B&
$&))\9I
 #76A+Ay9E@ LQ	:s   ($P A1Q76Q7c           	     Z   VP                   R8X  d   \        V P                  V VR7      pM\        P                  ! W4      p\        V.4      ;r4\        V 4      '       d   V# \        VP                  4       4       EFj  p\        P                  ! RWTRR7       \        P                  ! 4       ;_uu_ 4        V P                  VP                  ^,          4      pVP                  ^R pV'       d*   \        P                  ! RV4      pWXn        \#        WV4      p\%        V4      '       g?   VP'                  RR7      p	V	R	8w  d   \        P(                  ! R
WQ4       VuuRRR4       u # VP+                  \,        P.                  ! V.4      4      p\%        V4      '       g&   \        P(                  ! RV4       VuuRRR4       u #  RRR4       \        P                  ! RVRR7       EKm  	  WC8w  d%   \        V U
u. uF  p
\1        W4      NK  	  up
4      # V#   + '       g   i     LZ; iu up
i )zz
Returns the function, that should to be executed in the end.
This is also the places where the decorators are processed.
r  )rB   r?   zdecorator: %s %sMAGENTA)colorr   F)include_prefixz	@runtime
zdecorator not found: %s on %sNz)not possible to resolve wrappers found %szdecorator end %sr   )rb   r   r@   r   r   r   r   reversedget_decoratorsr   rm   increase_indent_cmr   rg   r   
PythonNodera   r   rl   get_coderE   r   r   ValuesArgumentsr!   )rG   r   decoratee_valueinitialvaluesdec
dec_valuestrailer_nodesr   coder   s   &&         rM   r  r    s    yyJ$##"
 (44WC 122Gw''++-.		$cC%%'' ++CLLO<JLL2.M//)]C!$*7H
z??||5|9 <'MM"A3M! ('$  ''	(A(A6((KLFv;;I4P+ ('& ' (. 			$fI>>3 /4 G116GHHM5 ('2 Hs   4B%H&AH8H(H%c                h   RpV P                  4        F  w  r4\        V P                  V4      pVP                  V4      p\	        V\
        4      '       d	   \        u # ^ pWs8:  d!    \        V4      pWrP                  ,          pK&  VP                  4       pK  	  V#   \         d    \        u u # i ; i)z 
Checks if tuples are assigned.
N)assignment_indexesr   rB   r  r_   slicer   r	  maxStopIterationrk   )r   r   r  indexr   r  iteratedrZ   s   &&      rM   r  r  B  s     J..0 3 3T:$$R(eU##j	$!(^
 ^^#$$&	% 1&  ! !
 ! !s   &BB10B1c                   &   a  ] tR tRt o R tRtV tR# )r   i]  c                B    \        V P                  V P                  4      # rV   )r   rG   r   )selfs   &rM   rk   %ContextualizedSubscriptListNode.infer^  s    $T\\499==rR   rP   N)__name__
__module____qualname____firstlineno__rk   __static_attributes____classdictcell__)__classdict__s   @rM   r   r   ]  s     > >rR   r   c                   VR8X  d$   \        \        P                  ! V RRR4      .4      # VP                  R8X  d   VP                  ^ ,          R8X  g   . pVP                   F  pVR8X  d   V'       g   VP                  R4       K%  K'  VP                  R8X  dA   \        VP                  4      ^8X  d%   VP                  VP                  ^,          4       Kv  Kx  VP                  V4       K  	  VR.^\        V4      ,
          ,          ,          p\        \        P                  ! V .VO5!  .4      # VP                  R8X  d,   \        \        P                  ! V P                  W4      .4      # V P                  V4      # )z$
Handles slices in subscript nodes.
r   N	subscriptr   sliceopr  )
r   r   Slicerb   rg   rR  rl   r   r@   r   )rG   r  r   els   &&  rM   r   r   b  s0    |tTBCDD	{	"5>>!+<+C ..BSyMM$' I%r{{#q(MM"++a.1 ) b! ! 	4&AFO,,9&9:;;		&66w7N7NPW_`aa e$$rR   rV   )Q__doc__rp   r=  parso.pythonr   jedir   r   jedi.inference.base_valuer   r   r   r   r	   jedi.inference.lazy_valuer
   jedi.inferencer   r   r   r   r   jedi.inference.valuer   r   r   #jedi.inference.value.dynamic_arraysr   r   r   jedi.inference.helpersr   r   r   r   r   jedi.inference.compiled.accessr   jedi.inference.cacher   !jedi.inference.gradual.stub_valuer   jedi.inference.gradualr   jedi.inference.namesr   jedi.inference.contextr    jedi.inference.value.decoratorr!   jedi.pluginsr"   rg  itemsrh  rQ   r   rr   r   increase_indentr`   r   r   r   r   r   r   r2  r   r   rH  rK  rN  rV  r9  decorater  r  r  r   r   )kr   s   00rM   <module>r     s       * * 3 # $ # " $ : ) R -/ / ? = 9 - 3 1 4 ' .),, " ":!?!?!A$!AAuqu}!A$  
BE=P
0 i0) 1) K/  K/\-0R%j 
 
 J JZ2  "< &'C"Zz ] ]D .  .b6>&8 >
%a$s   F%