
    c@                       U d Z ddlmZ ddlZddlZddlZddlmZm	Z	m
Z
mZ ddlmZmZ ddlmZmZmZmZmZmZ ddlmZ ddlmZmZ dd	lmZmZmZmZm Z  dd
l!m"Z" ddl#m$Z$m%Z%m&Z&  ej'        d          Z( ej'        d          Z) edej*        ej+                  Z,ddZ-ddZ.dZ/ddddddddddddd d!Z0d" e01                                D             Z2d# e01                                D             Z3d$d%d&dd'Z4ej5        ej6        ej7        ej8        d'Z9d(e:d)<   dd.Z;d/ ej*        _<        d0 ej+        _<        d1 ej=        _<        d2 ej>        _<        d3 ej?        _<        d4 d5 d6 d7 d8 d9 d: d; d< d= d> d? ej@        d!ZA eBeA1                                          D ]\  ZCZDeDeAeCd@z   <   ejE        ddM            ZFeFej>        _G        ddNZHddRZIejE        ddU            ZJeJej*        _G        eJej+        _G        ejE        ddX            ZKeKejL        _G        eKejM        _G        	 dY ZNejO        	 	 	 ddd`            ZPePejQ        _R        ePejS        _R        	 	 	 dddbZTeTej*        _R        eTej+        _R        	 	 	 ddddZUeUejV        _R        eUejW        _R        ddgZX	 	 	 dddiZYeYejZ        _R        ejO        	 	 	 dddk            Z[	 	 	 dddmZ\e[ej]        _R        e\ej^        _R        e[ej_        _R        dn Z`ejO        	 	 	 dddp            Zaeaejb        _R        dq ZcejO        	 	 	 ddds            Zdedeje        _R        ejO        	 	 dddu            Zfefejg        _R        ejE        	 	 	 dddw            Zheheji        _R        ejE        	 	 ddd|            Zjejejk        _R        ejE        	 	 ddd~            Zlelejm        _R        ejE        	 	 ddd            Znenejo        _R        dS )zcThis module contains a set of functions to handle python protocols for nodes
where it makes sense.
    )annotationsN)Callable	GeneratorIteratorSequence)AnyTypeVar)	argumentsbases
decoratorshelpersnodesutil)Context)InferenceContextcopy_context)AstroidIndexErrorAstroidTypeErrorAttributeInferenceErrorInferenceError	NoDefault)node_classes)ConstFactoryResultInferenceResultSuccessfulInferenceResultraw_buildingobjects_TupleListNodeTreturnstrc                    d| dd          z   S )N__r    names    1lib/python3.11/site-packages/astroid/protocols.py_reflected_namer(   )       48    c                    d| dd          z   S )N__ir#   r$   r%   s    r'   _augmented_namer-   -   r)   r*   zcontextlib.contextmanager__add____sub____truediv____floordiv____mul____pow____mod____and____or____xor__
__lshift__
__rshift__
__matmul__)+-/z//***%&|^z<<z>>@c                4    i | ]\  }}|t          |          S r$   )r(   .0keyvalues      r'   
<dictcomp>rJ   B   s3       $0S%C		  r*   c                :    i | ]\  }}|d z   t          |          S )=)r-   rF   s      r'   rJ   rJ   E   s7       *63C#Iu%%  r*   __pos____neg__
__invert__)r;   r<   ~notzdict[str, Callable[[Any], Any]]_UNARY_OPERATORSobjr   opr   c                r    | t           u r| }nt          |         } ||           }t          j        |          S )z{Perform unary operation on `obj`, unless it is `NotImplemented`.

    Can raise TypeError if operation is unsupported.
    )NotImplementedrR   r   const_factory)rS   rT   rI   funcs       r'   _infer_unary_oprY   W   s@    
 n #S		u%%%r*   c                F    t          t          | j                  |          S N)rY   tupleeltsselfrT   s     r'   <lambda>r`   d   s    oeDI>N>NPR.S.S r*   c                ,    t          | j        |          S r[   )rY   r]   r^   s     r'   r`   r`   e   s    _TY-K-K r*   c                F    t          t          | j                  |          S r[   )rY   setr]   r^   s     r'   r`   r`   f   s    OC	NNB,O,O r*   c                ,    t          | j        |          S r[   )rY   rI   r^   s     r'   r`   r`   g   s    odj".M.M r*   c                F    t          t          | j                  |          S r[   )rY   dictitemsr^   s     r'   r`   r`   h   s    _T$*=M=Mr-R-R r*   c                    | |z   S r[   r$   abs     r'   r`   r`   m   
    a!e r*   c                    | |z
  S r[   r$   ri   s     r'   r`   r`   n   rl   r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   o   rl   r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   p   
    qAv r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   q   rl   r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   r   s
    q!t r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   s   rl   r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   t   rl   r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   u   rl   r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   v   rl   r*   c                    | |z  S r[   r$   ri   s     r'   r`   r`   w   rp   r*   c                    | |z	  S r[   r$   ri   s     r'   r`   r`   x   rp   r*   rL   r_   nodes.Constopnodenodes.AugAssign | nodes.BinOpoperatorotherr   contextr   _r   BGenerator[ConstFactoryResult | type[util.Uninferable], None, None]c              #    K   t          j        t                    }t          |t           j                  r|dk    r^t          | j        t
          t          f          r=t          |j        t
          t          f          r| j        dk    s|j        dk    r|V  d S 	 t          |         }	 t          j         || j        |j                            V  d S # t          $ r |V  Y nt          $ r t          j        V  Y nw xY wd S d S # t          $ r |V  Y d S w xY wt          | j        t                    r|dk    rt          j        V  d S |V  d S )Nr?   g     j@r@   )r   ConstrV   
isinstancerI   intfloatBIN_OP_IMPLrW   	TypeError	Exceptionr   Uninferabler    )r_   rz   r|   r}   r~   r   not_implementedimpls           r'   const_infer_binary_opr      s      k.11O%%% 	4:U|44	 5;e55	 c!		 &+[3%6		 "!!!F
	"x(D')$$tz5;*G*GHHHHHHH & & &%%%%%% ' ' '&&&&&&' &%&& 	" 	" 	"!!!!!!!	"	DJ	$	$ S s<   D )*C C?#D %C?<D >C??D DDc                    |                      |          }fd| j        D             }t          |          |j        z  |_        |S )Nparentc              3  v   K   | ]3}|t           j        ut          j        |          pt           j        V  4d S r[   )r   r   r   
safe_infer)rG   eltr~   s     r'   	<genexpr>z'_multiply_seq_by_int.<locals>.<genexpr>   sZ        d&&3((<D,<     r*   )	__class__r]   listrI   )r_   rz   r}   r~   nodefiltered_eltss      `  r'   _multiply_seq_by_intr      s_     >>>((D   9  M
 ]##ek1DIKr*   r]   Sequence[InferenceResult]#Iterator[SuccessfulInferenceResult]c              #     K   | D ]f}|t           j        u rt          j                    V  &|                    |          D ]*}|t           j        ur|V  t          j                    V  +gd S r[   )r   r   r   Unknowninfer)r]   r~   r   inferreds       r'   _filter_uninferable_nodesr      s        * *$"" 	*-//!!!!IIg.. * *4#33 *"NNNN-//))))	*	* *r*   methodMGenerator[_TupleListNodeT | nodes.Const | type[util.Uninferable], None, None]c           	   #    K   d|_         t          j        t                    }t	          || j                  ro|dk    ri|                     |          }t          t          j        t          | j
        |          t          |j
        |                              |_
        |V  dS t	          |t          j                  r<|dk    r6t	          |j        t                    s|V  dS t          | |||          V  dS t	          |t          j                  rB|dk    r<t!          j        |          }|st$          j        V  dS t          | |||          V  dS |V  dS )zInfer a binary operation on a tuple or list.

    The instance on which the binary operation is performed is a tuple
    or list. This refers to the left-hand side of the operation, so:
    'tuple() + 1' or '[] + A()'
    Nr;   r   r>   )	boundnoder   r   rV   r   r   r   	itertoolschainr   r]   rI   r   r   r   Instancer   class_instance_as_indexr   r   )	r_   rz   r|   r}   r~   r   r   r   as_indexs	            r'   tl_infer_binary_opr      s       Gk.11O%(( X_ ~~V~,,O)$)W==)%*g>> 
 
	 




	E5;	'	' HO %+s++ 	!!!!F"4@@@@@@@	E5>	*	* x3 2599 	H""""""&tVXwGGGGGGGr*   bases.Instance | nodes.ClassDef&Generator[InferenceResult, None, None]c                .    |                     | |          S r[   )infer_call_result)r_   rz   r|   r}   r~   r   s         r'   instance_class_infer_binary_opr      s     ##D'222r*   c              #    K   |dd         }|                     d          }| D ]+}|t          j        u rt          |d          s#	 |                                }n# t
          $ r Y Ew xY w	 t          ||         t          j        t          j	        f          r|g}n# t          $ r Y nw xY w|D ]}t          j        |          }	 |                    ||          }n# t          t          t          f$ r Y Gw xY w|s|V  R|t          j        u r n=	 t          |                    |          ||          E d{V  # t"          $ r Y  nw xY w-dS )z<Recursive function to resolve multiple assignments on loops.Nr   itered)popr   r   hasattrr   r   r   r   r   Name
IndexErrorgetitemAttributeErrorr   r   _resolve_looppartr   r   )	partsassign_pathr~   indexpartr   stmt
index_nodeassigneds	            r'   r   r     s     aaa.KOOAE " "4## 	tX&& 		[[]]FF 	 	 	H		&-%+uz)BCC   	 	 	D	 	 	DU++J<<
G<<"$46GH     T-- 
0 w//g            &   EEC" "sH   A
A*)A*./B
B+*B+CC87C8*D>>
EEnodes.For | nodes.Comprehensionr   &node_classes.AssignedStmtsPossibleNodeInferenceContext | Noner   list[int] | Nonec              #  |  K   t          | t          j                  st          | dd          r| |||dS |Q| j                            |          D ]5}t          |t          j        t          j        f          r|j        E d {V  6n/t          | j                            |          ||          E d {V  | |||dS )Nis_asyncFr   unknownr   r~   )
r   r   AsyncForgetattriterr   TupleListr]   r   )r_   r   r~   r   lsts        r'   for_assigned_stmtsr   ;  s       $'' 
74U+K+K 
 &	
 
 	
  U9??7++ 	$ 	$C#UZ899 $8#######	$ %TY__W%=%={GTTTTTTTTT"	  r*   nodes.Tuple | nodes.Listc                    |g }	 | j                             |          }n&# t          $ r}t          d| ||          |d }~ww xY w|                    d|           | j                            | ||          S )Nz6Tried to retrieve a node {node!r} which does not existr   r   r~   r   )r   r~   r   )r]   r   
ValueErrorr   insertr   assigned_stmts)r_   r   r~   r   r   excs         r'   sequence_assigned_stmtsr   \  s      	%%   D#	
 
 

 	 q%   ;%%7 &   s   ! 
A?A#nodes.AssignName | nodes.AssignAttrc                :    | j                             | |          S )N)r   r~   )r   r   r_   r   r~   r   s       r'   assend_assigned_stmtsr   x  s     ;%%4%AAAr*   r&   
str | Nonec              #  h  K   | j         s| j        s| j        st          j        V  d S | j        j        }| j         rt          | j         d         dd           |k    r|dk    r| j        j                                        }t          |t          j                  o
|j        dk    }|j        r+t          |j        t          j                  r|j        j        }|s|dk    r|V  d S |dk    r|                                V  d S |r|j        r|j        j        }t'          |d          r|j        }t'          |d          t          |dd           | j        j        k    rCt          j        |j        |j                  }|                    | j        ||          E d {V  d S || j        k    rpt          j        d          }| |_        | j         sH| j        j        d	k    r8| j        j                                        }|                                g|_        |V  d S || j        k    r!t          j        i           }	| |	_        |	V  d S 	 t5          |          }|                     |                              |          E d {V  t          j        V  d S # t:          $ r t          j        V  Y d S w xY w)
Nr   r&   staticmethod	metaclassclassmethodr   _proxiedr$   __init__)r
   varargkwargr   r   r   typer   scoper   r   ClassDefr   r   r   r   instantiate_classcallcontextcalleer   r&   CallSiteextra_contextinfer_argumentrW   r]   r   default_valuer   r   )
r_   r&   r~   functypeclsis_metaclassr   	call_siter   r   s
             r'   _arguments_infer_argnamer     s     
 N dk TZ {H 	DN1%vt44< &
 k &&((!#u~66R38{;R  	-G,=u~!N!N 	-#,C 	8}4 	IIIFx 	'')))))F 7& $+fj)) 	%_F fj)) 	%664((DK,<< 	!*7+>@UVVI //T7KKKKKKKKKFt{ $R((~ 	4$+"2j"@ 	4+$**,,C00223FKtz #B''w''%%d++11':::::::::   s   AJ J10J1nodes.Argumentsc                   	 |j         }n# t          $ r d }Y nw xY w|r;|j        r4|j        j        }t	          |d          r|j        }t	          |d          nt          | ||          S |r}t          |dd           |                    d          j         k    rO|j        }t          |          }d |_        t          j        ||          }|                    | j        ||          S t          | ||          S )Nr   r&   Tfuturer~   )r&   r   r   r   r   r   r   r   framer   r
   r   r   r   )r_   r   r~   r   	node_namer   r   argss           r'   arguments_assigned_stmtsr     s*   I		    			
  B7& B$+fj)) 	%_F fj)) 	% (iAAA D--41H1H1MM D)w''"!+w???""4;	7CCC#D)W===s   
 0nodes.AugAssign | nodes.Assign | nodes.AnnAssignc              #     K   |s| j         V  d S t          | j                             |          ||          E d {V  | |||dS Nr   )rI   _resolve_assignment_partsr   r   s       r'   assign_assigned_stmtsr     s        jt(
!!;        
 "	  r*   nodes.AnnAssignc              #  ^   K   t          | |||          D ]}|t          j        V  |V  d S r[   )r   r   r   )r_   r   r~   r   r   s        r'   assign_annassigned_stmtsr    sT       *$g{KK   	"""""NNNN	 r*   c              #  0  K   |dd         }|                     d          }| D ]}d}t          |t          j                  r$	 |j        |         \  }}ng# t
          $ r Y  dS w xY wt          |d          rEt          j        |          }	 |                    ||          }n# t          t          f$ r Y  dS w xY w|s dS |s|V  |t          j        u r dS 	 t          |                    |          ||          E d{V  # t          $ r Y  dS w xY wdS )z3Recursive function to resolve multiple assignments.Nr   r   )r   r   r   Dictrg   r   r   r   r   r   r   r   r   r   r   r   )r   r   r~   r   r   r   r   r   s           r'   r   r   
  s     aaa.KOOAE ! !dEJ'' 	"j/!!    T9%% 	U++J<<
G<<$&78     	FF 	 NNNN)) 
	FF4NN7++['          "   A! !s6   A
A#"A#B""B87B8*D
DDnodes.ExceptHandlerc              #     K   t          j        | j                  D ]:}t          |t          j                  rt                              |          }|V  ;| |||dS r   )r   unpack_inferr   r   r   r   r   ExceptionInstance)r_   r   r~   r   r   s        r'   excepthandler_assigned_stmtsr	  2  sq       !-di88  h// 	;00::H"	  r*   c              #  "  K   	 t          |                    |                    }n## t          $ r}t          |          |d }~ww xY wt	          |t
          j                  r|j        }|j        st          d|          |j        j	        D ]_}t          |                    |          d           }t	          |t          j
                  r|                                t          k    r n`t          |          	 t          |                                          V  d S # t          $ r}t          |          |d }~ww xY wt	          |t
          j                  r	 t          |                    d|                    }n0# t          t           t          f$ r}	t          |          |	d }	~	ww xY wt	          |t
          j                  st          |          |                    | |          E d {V  d S t          |          )Nr   )r   z,No decorators found on inferred generator %s	__enter__)nextr   StopIterationr   r   r   r   r   r   r   FunctionDefqname_CONTEXTLIB_MGRinfer_yield_typesr   igetattrr   BoundMethodr   )
r_   mgrr~   r   erX   decorator_node	decoratorenterr   s
             r'   _infer_context_managerr  I  sO     .		'	2233 . . .#&&&A-.(EO,, ' 	 >T    #o3 	, 	,N^11'1BBDIII)U%677 ??$$7 E !d++++	3x11334444444 	3 	3 	3 d+++2	3 
Hen	-	- 	'	9**;*HHIIEE 7G 	9 	9 	9 h///S8	9%!233 	- e,,,,**499999999999#&&&&sD   #( 
AAA#D& &
E0EE$$F	 	F6 F11F6
nodes.Withc           
   #    K   	 t          fd| j        D                       }n# t          $ r Y dS w xY w|t          | ||          E d{V  nt          | ||          D ]}|}|D ]}}t	          |d          st          d| ||          	 |j        |         }5# t          $ r}t          d| ||          |d}~wt          $ r}t          d| ||          |d}~ww xY w|V  | ||dS )	a  Infer names and other nodes from a *with* statement.

    This enables only inference for name binding in a *with* statement.
    For instance, in the following code, inferring `func` will return
    the `ContextManager` class, not whatever ``__enter__`` returns.
    We are doing this intentionally, because we consider that the context
    manager result is whatever __enter__ returns and what it is binded
    using the ``as`` keyword.

        class ContextManager(object):
            def __enter__(self):
                return 42
        with ContextManager() as f:
            pass

        # ContextManager().infer() will return ContextManager
        # f.infer() will return 42.

    Arguments:
        self: nodes.With
        node: The target of the assignment, `as (a, b)` in `with foo as (a, b)`.
        context: Inference context used for caching already inferred objects
        assign_path:
            A list of indices, where each index specifies what item to fetch from
            the inference results.
    c              3  .   K   | ]\  }}|k    |V  d S r[   r$   )rG   r  varsr   s      r'   r   z&with_assigned_stmts.<locals>.<genexpr>  s0      EE;CE3EEEEEEr*   Nr]   z0Wrong type ({targets!r}) for {node!r} assignment)r   targetsr   r~   zCTried to infer a nonexistent target with index {index} in {node!r}.z1Tried to unpack a non-iterable value in {node!r}.r   )	r  rg   r  r  r   r   r]   r   r   )	r_   r   r~   r   r  resultrS   r   r   s	    `       r'   with_assigned_stmtsr   o  s     BEEEE$*EEEEE   tt ")$W==========,T3@@ 	 	FC$  sF++ (J! $$/ '   (5/CC!   ('! $$/ '    !   (K! $$/ '    IIII"	  s0    & 
44B
C#'B<<C#	CC#nodes.NamedExprc              #     K   | j         |k    r#| j                            |          E d{V  dS t          d| ||          )z:Infer names and other nodes from an assignment expression.r   Nz$Cannot infer NamedExpr node {node!r}r   )targetrI   r   r   r   s       r'   named_expr_assigned_stmtsr$    sk       {d 
:##G#444444444442#	
 
 
 	
r*   nodes.Starredc              #  4
  K   dfd	|                      d
          }t          |t          j        t          j        f          st          d| |||          |t                      }t          |t          j                  rQ|j        }|j        d         }t          |t          j	                  st          j        V  dS t          d |                    t          j                  D                       dk    rt          d| |||          	 t          |                    |                    }n&# t
          t"          f$ r t          j        V  Y dS w xY w|t          j        u st%          |d          st          j        V  dS 	 t'          j        |                                          }n# t,          $ r t          j        V  Y dS w xY wt/          |j                  D ]\  }	}
t          |
t          j                  s|s n|                                 8t'          j        t5          |j        |	d                             }|D ]}t          |t          j                  s|s ni|                                 5t          j        t:          j        | |j        |j                   }|!                    tE          |                     |V   t          |t          j                  r'	 t          |j#                            |                    }n&# t
          t"          f$ r t          j        V  Y dS w xY w|t          j        u st%          |d          st          j        V  dS 	 |                                }n# t,          $ r t          j        V  Y dS w xY w|j$        }t          |t          j%                  st          d|          g } | ||           |st          d|          |d         \  }}||dz
  k    }tM          ||rdn||z
            }|}|D ]}d}t/          |          D ]\  }	}t%          |d          s nl|	dz   tO          |          u r|}n|d         }	 |                                }||         }|}V# tP          $ r Y  n t,          $ r t          j        V  Y   dS w xY wt          j        t:          j        | | j        | j                   }|!                    |pg            |V   dS t          j        V  dS dS )aD  
    Arguments:
        self: nodes.Starred
        node: a node related to the current underlying Node.
        context: Inference context used for caching already inferred objects
        assign_path:
            A list of indices, where each index specifies what item to fetch from
            the inference results.
    starredr%  r#  nodes.Tuplelookupslist[tuple[int, int]]r   Nonec                   |                                 }t          |          D ]\  }}t          |t          j                  rA|j        j        | j        j        k    r'|                    |t          |          f            d S t          |t          j	                  rC|                    |t          |                                           f            | ||           d S r[   )
r   	enumerater   r   StarredrI   r&   appendlenr   )r'  r#  r)  r   r   element$_determine_starred_iteration_lookupss         r'   r2  zDstarred_assigned_stmts.<locals>._determine_starred_iteration_lookups  s     '// 		P 		PNE77EM22M&'-*<< s6{{3444'5;// Ps7>>+;+;'<'<=>>>44WgwOOO		P 		Pr*   Tr   zDStatement {stmt!r} enclosing {node!r} must be an Assign or For node.)r   r   r   r~   Nr   c              3     K   | ]}d V  dS )   Nr$   )rG   r   s     r'   r   z)starred_assigned_stmts.<locals>.<genexpr>  s"      <<Qq<<<<<<r*   r4  z=Too many starred arguments in the assignment targets {lhs!r}.)r   r  r   r~   r   )ctxr   lineno
col_offset)r]   r   z8Could not make sense of this, the target must be a tuplez5Could not make sense of this, needs at least a lookup)r'  r%  r#  r(  r)  r*  r   r+  ))	statementr   r   AssignForr   r   rI   r  BaseContainerr   r   sumnodes_of_classr.  r  r   r  r   collectionsdequer   r   r-  r]   popleftreversedr   r   r   Storer6  r7  postinitr   r   r#  r   slicer0  r   )r_   r   r~   r   r   rI   lhsrhsr]   r   	left_nodelhs_elts
right_nodepackedinferred_iterabler   r#  r)  last_element_indexlast_element_lengthis_starred_lastlookup_slicelast_lookupr1  found_elementlookup
cur_lookupitered_inner_elementunpackedr2  s                                @r'   starred_assigned_stmtsrW    sG     $P P P P P P  >>>&&DdU\59566 
R
 
 
 	
  %"$$$%% =
l1o#u233 	""""F<<#,,U];;<<<<<q@ 	 O   	u{{7++,,CC. 	 	 	""""FF	 $"" 	'#x*@*@ 	""""F	$SZZ\\22DD 	 	 	""""FF	 !*#( 3 3 	 	E9i77  E"(#(5662B)C)CDDH&  
!*em<<  HHJJJ :"~	   T$ZZ000$	"" T	 $TY__W_%E%E F F. 	 	 	""""FF	  00 	x9
 9
 	 """"F	&--//FF 	 	 	""""FF	 &%+.. 	 J   
 *,,,T67CCC 	 GQX   
 3:"+//,1Dq1HI#SDD*=@R*R
 
 # (	 (	G !M!*7!3!3 , ,vw11 E19G, +.9JJ "(J
,+2>>+;+;(2:>G %,MM "   EE    ****FFFF zM{?	  H =#6B777NNNFFiT Ts`   "D5 5EE
&F1 1GG2(L L>=L>0N N! N!1R
R:R:9R:nodes.MatchMappingnodes.AssignNamer+  #Generator[nodes.NodeNG, None, None]c              #  
   K   dS zbReturn empty generator (return -> raises StopIteration) so inferred value
    is Uninferable.
    Nr$   r   s       r'   match_mapping_assigned_stmtsr]           Fr*   nodes.MatchStarc              #  
   K   dS r\  r$   r   s       r'   match_star_assigned_stmtsra    r^  r*   nodes.MatchAsc              #     K   t          | j        t          j                  r@t          | j        j        t          j                  r| j        | j        j        j        V  dS dS dS dS )z}Infer MatchAs as the Match subject if it's the only MatchCase pattern
    else raise StopIteration to yield Uninferable.
    N)r   r   r   	MatchCaseMatchpatternsubjectr   s       r'   match_as_assigned_stmtsrh    s}       	4;00)t{)5;77) L)
 k (((((() ) ) ) ) )r*   )r   r    )rS   r   rT   r    r   r   )r_   ry   rz   r{   r|   r    r}   r   r~   r   r   r   r   r   )
r_   r   rz   r{   r}   ry   r~   r   r   r   )r]   r   r~   r   r   r   )r_   r   rz   r{   r|   r    r}   r   r~   r   r   r   r   r   )r_   r   rz   r{   r|   r    r}   r   r~   r   r   r   r   r   )NNN)
r_   r   r   r   r~   r   r   r   r   r   )
r_   r   r   r   r~   r   r   r   r   r   )
r_   r   r   r   r~   r   r   r   r   r   )r&   r   r~   r   r   r   )
r_   r   r   r   r~   r   r   r   r   r   )
r_   r   r   r   r~   r   r   r   r   r   )
r_   r   r   r   r~   r   r   r   r   r   )
r_   r  r   r   r~   r   r   r   r   r   )
r_   r  r   r   r~   r   r   r   r   r   )NN)
r_   r!  r   r   r~   r   r   r   r   r   )
r_   r%  r   r   r~   r   r   r   r   r   )
r_   rX  r   rY  r~   r   r   r+  r   rZ  )
r_   r_  r   rY  r~   r   r   r+  r   rZ  )
r_   rb  r   rY  r~   r   r   r+  r   rZ  )p__doc__
__future__r   r?  r   r|   operator_modcollections.abcr   r   r   r   typingr   r	   astroidr
   r   r   r   r   r   astroid.constr   astroid.contextr   r   astroid.exceptionsr   r   r   r   r   astroid.nodesr   astroid.typingr   r   r   lazy_importr   r   r   r   r   r(   r-   r  BIN_OP_METHODrg   REFLECTED_BIN_OP_METHODAUGMENTED_OP_METHODUNARY_OP_METHODposneginvertnot_rR   __annotations__rY   infer_unary_opSetr   r  matmulr   r   _KEY_IMPLyes_if_nothing_inferredr   infer_binary_opr   r   r   r   r   r   r   raise_if_nothing_inferredr   r;  r   Comprehensionr   r   
AssignName
AssignAttrr   r   	Argumentsr   r  r:  	AnnAssign	AugAssignr   r	  ExceptHandlerr  r   Withr$  	NamedExprrW  r.  r]  MatchMappingra  	MatchStarrh  MatchAsr$   r*   r'   <module>r     s  
   # " " " " "             C C C C C C C C C C C C         F F F F F F F F F F F F F F F F ! ! ! ! ! ! : : : : : : : :              ' & & & & &           t//
$
9
%
% '+U[%*EE       .			
	
				

	   4A4G4G4I4I    :G:M:M:O:O   
 
			  
						5 5     
& 
& 
& 
& TS KK
 OO	 MM RR
 
 
					

		

								



		  4))++,, $ $KD%#Ks
 #! ! ! $#!H 4     * * * * #' ' ' $#'T 1 /
  #3 3 3 $#3 "@ !? 
	& & &R % 48'+$(	    &%8 .	 %7  "
 48'+$(	    0 5 3
 
 48'+$(	B B B B B #8  "7  : : : :~ 48'+$(	> > > > >: ":  % 48'+$(	    &%. 48'+$(	
 
 
 
 
 4 !9 !6 % % %P % 48'+$(	    &%& &B  "#' #' #'L % 48'+$(	L L L L &%L^ 0
  % (,$(	
 
 
 
 &%
$ ";  # 48'+$(	A A A A $#AH  6  # (,	

 

 

 

 $#

 %A  ! # (,	

 

 

 

 $#

 ";  # (,	) ) ) ) $#)"  7   r*   