
    yIf%                      U d Z ddlmZ ddlZddlZddlZddl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 ddlmZmZmZmZmZmZmZ ddlmZmZmZ ddlmZmZ dd	lm Z m!Z! dd
l"m#Z#m$Z$m%Z% ddl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z=m>Z>m?Z?m@Z@ ejA        dk    rddlmBZB nddlCmBZB erddlmDZD ddl6mEZE ddZF ejG        de;          ZH ejG        dejI                  ZJed         ZKeeHeKee$         eejL        eM                  gef         ZNeeHee$         gej        ee?eJf         ddf         f         ZOeeHee$         gej        e?dee>         f         f         ZPeeHeQge=f         ZRejS        ddd            ZTddd"ZU eV            ZWddd#ZXddd$ZYddd%ZZ G d& d'e7j[        eej\        (          Z] G d) d*e7j^        e7j_        e7j[                  Z` G d+ d,e7j^        e7j_        e7j[                  Za G d- d.e7j_        e7j^                  Zbd/Zc G d0 d1e7jd                  Zed2 Zf	 ddd6Zg	 ddd<Zh G d= d>e7j_        e7j[                  Zi G d? d@e7jj                  Zk G dA dBe7jd        e7jj                  Zl G dC dDe7jd        e7jj                  Zm G dE dFe7jd        e7jn        e7jj                  Zo G dG dHe7jn                  Zp G dI dJe;          Zq G dK dLe7j^        e7jj                  Zr G dM dNe;          Zsejt        eju        ejv        ejw        ejx        ejy        dO dP dQZzdRe{dS<   dTdUhZ| G dV dWe;          Z} G dX dYe;          Z~ G dZ d[e7j^        e          Z G d\ d]e7j^        e7jj                  Z G d^ d_e;          Z G d` dae7j[                  Z G db dce7jd        e7jj                  Z G dd dee;e          Z G df dge7jj                  Z G dh die7j^                  Z G dj dke7j        e7jd        e7jj                  Z G dl dme7j        e7jd        e7jj                  Z G dn doe          Z G dp dqe;          Z G dr dse7j                  Z G dt due;          Z G dv dwe7j^        e7jj                  Z G dx dye7j        e7jj                  Z G dz d{e;          Z G d| d}e7j                  Z G d~ de;          Z G d de]          ZL G d de7j^        e7jj                  Z G d de7jd                  Z G d de7j^        e7jj                  Z G d de7jj                  Z G d de7jj                  Z G d de]          Z G d de;          Z G d de7j[                  Z G d de;          Z G d de7j        e7jj                  Z G d de7j        e7jj                  Z G d de]          Z G d de7jd        e7jj                  Z G d de7jd                  ZG G d de7jd                  ZdddddZ G d de7jn                  Z G d de7j        e7jj                  Z G d de7j        e7jd        e7jj                  Z G d de          Z G d de;          Z G d de          Z G d de7j^                  Z G d de;          Z G d de;          Z G d de7jd                  Z G d de7jd                  Z G d de;          Z G d de7jj        e7j                  Z G d de;          Z G d de7j                  Z G d de          Z G dĄ de          Z G dƄ de          Z G dȄ de7jd        e          Z G dʄ de          Z G d̄ de7jd        e          Z G d΄ de7jd        e          Z G dЄ de          ZeeLeeeeee ed          e ee          e edҦ          eeeeMeeeeeeQeeeiZde{d<   ddلZdd݄Zdd߄ZdS )z;Module for some node classes. More nodes in scoped_nodes.py    )annotationsN)	GeneratorIterableIteratorMapping)cached_property)TYPE_CHECKINGAnyCallableClassVarLiteralOptionalUnion)
decorators	protocolsutil)Instance_infer_stmts)_EMPTY_OBJECT_MARKERContext)CallContextInferenceContextcopy_context)AstroidBuildingErrorAstroidErrorAstroidIndexErrorAstroidTypeErrorAstroidValueErrorAttributeInferenceErrorInferenceErrorNameInferenceError	NoDefaultParentMissingError_NonDeducibleTypeHierarchy)dunder_lookup)AstroidManager)_base_nodes)OP_PRECEDENCE)NodeNG)ConstFactoryResultInferenceErrorInfoInferenceResultSuccessfulInferenceResult)      )Selfnodes)LocalsDictNodeNGreturnboolc                F    t          | t          t                              S N)
isinstancetuple	CONST_CLSvalues    N/var/www/piapp/venv/lib/python3.11/site-packages/astroid/nodes/node_classes.py	_is_constr>   C   s    eU9--...    _NodesT)bound_BadOpMessageT)ListTuple
AssignName
AssignAttrNcontextInferenceContext | Nonec              #    K   t          | t          t          f          r8| j        D ]+}|t          j        u r|V  t          ||          E d{V  ,| |dS t          |                     |          t          j                  }|| u r	|V  | |dS |                     |          D ]7}t          |t          j	                  r|V  !t          ||          E d{V  8| |dS )zrecursively generate nodes inferred by the given statement.
    If the inferred value is a list or a tuple, recurse on the elements
    NnoderG   )
r8   rC   rD   eltsr   Uninferableunpack_infernextinferUninferableBase)stmtrG   eltinferreds       r=   rN   rN   _   s*     
 $u&& 29 	2 	2Cd&&&			#C1111111111111DJJw'')9::H4111JJw'' 7 7h 455 	7NNNN#Hg6666666666W---r?   
exceptionslist[str] | Nonec                   i }i }| }|                                  D ]}d||<   |||<   |}|}|                                 D ]K}||v rAt          |t                    rK|I|                    |          \  }}|                    ||                   \  }	}
d|	|fv r dS |	|k    r dS nt          |t                    r|                    |          \  }}|                    ||                   \  }	}
|
|urw|dk    o|	dk    o|                    |          }|dk    o |	dk    o||                             |          }|dk    o|	dk    }|dk    o|	dk    }t          ||||f          r dS n|dk    r|	dk    r|||         uc S  dS |}MdS )	a  return true if the two given statements are mutually exclusive

    `exceptions` may be a list of exception names. If specified, discard If
    branches and check one of the statement is in an exception handler catching
    one of the given exceptions.

    algorithm :
     1) index stmt1's parents
     2) climb among stmt2's parents until we find a common parent
     3) if the common parent is a If or Try statement, look if nodes are
        in exclusive branches
       NtestFThandlersbodyorelse)node_ancestorsr8   Iflocate_childTrycatchany)stmt1stmt2rU   stmt1_parentschildrenpreviousrK   c2attrc2nodec1attrc1node first_in_body_caught_by_handlers!second_in_body_caught_by_handlersfirst_in_else_other_in_handlers second_in_else_other_in_handlerss                  r=   are_exclusiverp   z   sG    MHH$$&&  d!H$$&& . .=   $## (:
(:!%!2!28!<!<!%!2!28D>!B!Bff--- !55V##44 $ D#&& :!%!2!28!<!<!%!2!28D>!B!B''*, 7"f,7$NN:66 5 &( ="j0=$TN00<< 6 *,C81C 4 (*Cv/C 5 <=;<	  $  $tt$ z))f
.B.B#8D>9999555r?   c                   t          | t                    r1t          | j        t          t	          d          f          r| j        S n| dS 	 t          |                     |                    }t          |t                    r0t          |j        t          t	          d          f          r|j        S n# t          t          f$ r Y nw xY wt          S )z'Get the value of the given slice index.NrG   )
r8   Constr<   inttyperO   rP   r    StopIteration_SLICE_SENTINEL)indexrG   rT   s      r=   _slice_valuery      s     % *ekCd#455 	;		t
	*EKKK8899H (E** *hnsDJJ.?@@ *#>) . 	 	 	D	 s   #B5 5C	C	c                
   t          | j        |          }t          | j        |          }t          | j        |          }t	          d |||fD                       rt          |||          S t          d| | j        |          )Nc              3  (   K   | ]}|t           uV  d S r7   )rw   .0elems     r=   	<genexpr>z_infer_slice.<locals>.<genexpr>   s'      
H
H44&
H
H
H
H
H
Hr?   z'Could not infer slice used in subscriptmessagerK   rx   rG   )ry   lowerupperstepallslicer   parent)rK   rG   r   r   r   s        r=   _infer_slicer      s    W--EW--E	7++D

H
HE5$3G
H
H
HHH )UE4(((
9k	   r?   c                   	 t          |t                    r@t          ||          }|                                 }||         |_        | j        |_        |S t          |t                    r||j                 S nh# t          $ r}t          d| ||          |d}~wt          $ r}t          d| ||          |d}~wt          $ r}t          d| ||          |d}~ww xY wt          d| d          )	zHGet a slice or an item, using the given *index*, for the given sequence.rr   z&Slice {index!r} cannot index containerr   NzIndex {index!s} out of rangeType error {error!r}zCould not use  as subscript index)r8   Slicer   	__class__rL   r   rs   r<   
ValueErrorr   
IndexErrorr   	TypeErrorr   )instancerL   rx   rG   index_slicenew_clsexcs          r=   _container_getitemr      sY   eU## 	&ug>>>K((**G,GL%_GNNeU## 	%$$	%   <	
 
 

 	    2	
 
 

 	    *PW
 
 
	
 FEFFF
G
GGs6   AA: !A: :
CBC%B99CCCc                       e Zd ZdZdZd! fdZd"dZed#d            Zd Z	d$d%dZ
ej        d&d            Zd Zej        	 d$d'd            Z	 d$d(d Z xZS ))BaseContainerz.Base class for Set, FrozenSet, Tuple and List.rL   lineno
int | None
col_offsetr   NodeNG | None
end_linenoend_col_offsetr4   Nonec               d    g | _         	 t                                          |||||           d S Nr   r   r   r   r   )rL   super__init__selfr   r   r   r   r   r   s         r=   r   zBaseContainer.__init__  sI     68	'!!) 	 	
 	
 	
 	
 	
r?   rL   list[SuccessfulInferenceResult]c                    || _         d S r7   r   )r   rL   s     r=   postinitzBaseContainer.postinit,      			r?   Iterable[Any]r0   c                H     | ddddd          }d |D             |_         |S )zCreate a node of this type from the given list of elements.

        :param elts: The list of elements that the node should contain.

        :returns: A new node containing the given elements.
        Nr   r   r   r   r   c                N    g | ]"}t          |          rt          |          n|#S  )r>   const_factoryr}   es     r=   
<listcomp>z/BaseContainer.from_elements.<locals>.<listcomp>>  s0    KKK1<]1%%%1KKKr?   r   )clsrL   rK   s      r=   from_elementszBaseContainer.from_elements/  sF     s
 
 
 LKdKKK	r?   c                    | j         S )zAn iterator over the elements this node contains.

        :returns: The contents of this node.
        :rtype: iterable(NodeNG)
        r   r   s    r=   iteredzBaseContainer.iteredA  s     yr?   NrG   rH   r5   c                *    t          | j                  S )zeDetermine the boolean value of this node.

        :returns: The boolean value of this node.
        )r5   rL   r   rG   s     r=   
bool_valuezBaseContainer.bool_valueI  s    
 DIr?   strc                    dS )eGet the name of the type that this node represents.

        :returns: The name of the type.
        Nr   r   s    r=   pytypezBaseContainer.pytypeP  s      r?   c              #  $   K   | j         E d {V  d S r7   r   r   s    r=   get_childrenzBaseContainer.get_childrenW  s&      9r?   kwargsr
   Iterator[Self]c              +    K   t          d | j        D                       }|rf|                     |          } t          |           | j        | j        | j        | j        | j                  }|	                    |           |V  d S | V  d S )Nc              3  N   K   | ] }t          |t          t          f          V  !d S r7   )r8   Starred	NamedExprr   s     r=   r   z'BaseContainer._infer.<locals>.<genexpr>`  sB       %
 %
45Jq7I.//%
 %
 %
 %
 %
 %
r?   r   )
rb   rL   _infer_sequence_helperru   r   r   r   r   r   r   )r   rG   r   has_starred_named_exprvaluesnew_seqs         r=   _inferzBaseContainer._inferZ  s       "% %
 %
9=%
 %
 %
 "
 "
 " 	0099F d4jj{?{?#2  G V$$$MMMMMJJJJJr?   c                   g }| j         D ]}t          |t                    rwt          j        |j        |          }|st          | |          t          |d          st          | |          |                    |	                    |                     t          |t                    rCt          j        |j        |          }|st          | |          |                    |           |                    |           |S )z-Infer all values based on BaseContainer.elts.rJ   rL   )rL   r8   r   r   
safe_inferr<   r    hasattrextendr   r   append)r   rG   r   rS   starredr<   s         r=   r   z$BaseContainer._infer_sequence_helperr  s    9 	# 	#C#w'' #/#)W== E(dGDDDDw// E(dGDDDDg<<WEEFFFFC++ #	7;; E(dGDDDDe$$$$c""""r?   r   r   r   r   r   r   r   r   r   r   r4   r   )rL   r   r4   r   )rL   r   r4   r0   r7   )rG   rH   r4   r5   r4   r   )rG   rH   r   r
   r4   r   )rG   rH   r4   r   )__name__
__module____qualname____doc___astroid_fieldsr   r   classmethodr   r   r   abcabstractmethodr   r   r   raise_if_nothing_inferredr   r   __classcell__r   s   @r=   r   r     s#       88O
 
 
 
 
 
(       ["       	      ) ,0    *)0 26        r?   r   )	metaclassc                       e Zd ZdZdZd fdZej        Z	 e	j
        e	j        	 ddd                        Ze	j
        	 ddd            Z xZS )rE   a  Variation of :class:`ast.Assign` representing assignment to a name.

    An :class:`AssignName` is the name of something that is assigned to.
    This includes variables defined in a function signature or in a loop.

    >>> import astroid
    >>> node = astroid.extract_node('variable = range(10)')
    >>> node
    <Assign l.1 at 0x7effe1db8550>
    >>> list(node.get_children())
    [<AssignName.variable l.1 at 0x7effe1db8748>, <Call l.1 at 0x7effe1db8630>]
    >>> list(node.get_children())[0].as_string()
    'variable'
    namer   r   r   rt   r   r   r)   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r   r   r   r   r   r   r   r   r   r   r   s          r=   r   zAssignName.__init__  sI     	+!!) 	 	
 	
 	
 	
 	
r?   NrG   rH   r   r
   ;Generator[InferenceResult, None, InferenceErrorInfo | None]c                    t          | j        t                    r| j                            |          S t	          |                     |                    }t          ||          S )zVInfer an AssignName: need to inspect the RHS part of the
        assign node.
        rr   r8   r   	AugAssignrP   listassigned_stmtsr   r   rG   r   stmtss       r=   r   zAssignName._infer  \     dk9-- 	.;$$W---T(((99::E7+++r?   c                   ddl m} ddlm} |                     | j                  \  }}|sg ||                                           }|r|                    | j                  \  }}|s)t          | j        |                                 |          t          |          }| j        |_	         || |          |j
        | j        <   t          |||          S )zQInfer a Name: use name lookup rules.

        Same implementation as Name._infer.r   get_constraints_higher_function_scoper   scoperG   astroid.constraintr   astroid.helpersr   lookupr   r   r!   r   
lookupnameconstraintsr   	r   rG   r   r   r   framer   parent_function_s	            r=   	infer_lhszAssignName.infer_lhs  s     	766666::::::{{49--u 
	 54TZZ\\BBO =*11$)<<5 ($**,,    w''!Y)8u)E)EDI&E7E222r?   r   r   r   rt   r   rt   r   r)   r   r   r   r   r4   r   r7   rG   rH   r   r
   r4   r   )r   r   r   r   _other_fieldsr   r   assend_assigned_stmtsr   r   r   path_wrapperr   r  r   r   s   @r=   rE   rE     s        
  M
 
 
 
 
 
* 4N )15
, 
, 
, 
,  *)
, )153 3 3 3 *)3 3 3 3 3r?   rE   c                  (     e Zd ZdZdZd fdZ xZS )DelNameah  Variation of :class:`ast.Delete` representing deletion of a name.

    A :class:`DelName` is the name of something that is deleted.

    >>> import astroid
    >>> node = astroid.extract_node("del variable #@")
    >>> list(node.get_children())
    [<DelName.variable l.1 at 0x7effe1da4d30>]
    >>> list(node.get_children())[0].as_string()
    'variable'
    r   r   r   r   rt   r   r   r)   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r   r   s          r=   r   zDelName.__init__  sI     	-!!) 	 	
 	
 	
 	
 	
r?   r  r   r   r   r   r  r   r   r   s   @r=   r  r    sN        
 
 M
 
 
 
 
 
 
 
 
 
r?   r  c                  n     e Zd ZdZdZd fdZd Zej        ej	        	 ddd                        Z
 xZS )Namea  Class representing an :class:`ast.Name` node.

    A :class:`Name` node is something that is named, but not covered by
    :class:`AssignName` or :class:`DelName`.

    >>> import astroid
    >>> node = astroid.extract_node('range(10)')
    >>> node
    <Call l.1 at 0x7effe1db8710>
    >>> list(node.get_children())
    [<Name.range l.1 at 0x7effe1db86a0>, <Const.int l.1 at 0x7effe1db8518>]
    >>> list(node.get_children())[0].as_string()
    'range'
    r   r   r   r   rt   r   r   r)   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r   r   s          r=   r   zName.__init__#  sI     	0!!) 	 	
 	
 	
 	
 	
r?   c              #  t   K   | V  |                                  D ]}|                                E d {V  d S r7   )r   _get_name_nodes)r   
child_nodes     r=   r  zName._get_name_nodes8  s[      


++-- 	4 	4J!113333333333	4 	4r?   NrG   rH   r   r
   r   c                   ddl m} ddlm} |                     | j                  \  }}|sg ||                                           }|r|                    | j                  \  }}|s)t          | j        |                                 |          t          |          }| j        |_	         || |          |j
        | j        <   t          |||          S )zZInfer a Name: use name lookup rules

        Same implementation as AssignName._infer_lhs.r   r   r   r   r   r   s	            r=   r   zName._infer>  s     	766666::::::{{49--u 
	 54TZZ\\BBO =*11$)<<5 ($**,,    w''!Y)8u)E)EDI&E7E222r?   r  r7   r  )r   r   r   r   r  r   r  r   r   r  r   r   r   s   @r=   r  r    s          M
 
 
 
 
 
*4 4 4 )153 3 3 3  *)3 3 3 3 3r?   r  DEPRECATED_ARGUMENT_DEFAULTc                      e Zd ZU dZdZdZded<   	 ded<   	 ded	<   	 ded
<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 ded<   	 	 	 d<d= fd"Z	 	 	 	 	 d>d?d#Ze	j
        Z	 d$ Zed@ fd&            Zed'             Zdd(dAd,ZdBd.Zd/ ZdCd1Zefd2Zd3 Zej        	 dDdEd;            Z xZS )F	ArgumentsaR  Class representing an :class:`ast.arguments` node.

    An :class:`Arguments` node represents that arguments in a
    function definition.

    >>> import astroid
    >>> node = astroid.extract_node('def foo(bar): pass')
    >>> node
    <FunctionDef.foo l.1 at 0x7effe1db8198>
    >>> node.args
    <Arguments l.1 at 0x7effe1db82e8>
    )argsdefaults
kwonlyargsposonlyargsposonlyargs_annotationskw_defaultsr   varargannotationkwargannotationkwonlyargs_annotationstype_comment_argstype_comment_kwonlyargstype_comment_posonlyargs)varargkwarglist[AssignName] | Noner  list[NodeNG] | Noner  list[AssignName]r  r  list[NodeNG | None] | Noner  list[NodeNG | None]r   r  r  r  r  r   r   r  r  AssignName | Nonevararg_node
kwarg_nodeNr!  
str | Noner"  r   r)   r4   r   c                    t                                          |dddd           || _        	 || _        	 || _        || _        dS )zPAlmost all attributes can be None for living objects where introspection failed.Nr   r   r   r   r   )r   r   r!  r"  r)  r*  )r   r!  r"  r   r)  r*  r   s         r=   r   zArguments.__init__  s^     	 	 	
 	
 	
 8
@&$r?   c                    || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        |g }|| _
        |g }|| _        |g }|| _        d S r7   )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   s                 r=   r   zArguments.postinit  s      	 $&&&&<#'>$ !1.$ "!2"*&(#'>$#+')$(@%%%r?   c                    | j         |u r|S d S r7   r   r   r   r   s      r=   _infer_namezArguments._infer_name  s    ;%Ktr?   rt   c                b    t                      j        }t          || j        j        pd          S )zThe first line that this node appears on in the source code.

        Can also return 0 if the line can not be determined.
        r   )r   
fromlinenomaxr   )r   r   r   s     r=   r4  zArguments.fromlineno  s+     #64;16Q777r?   c                   t          t          j        | j        pd| j        pd                    }| j        r|                    | j                   || j        pdz  }| j        r|                    | j                   |S )zGet all the arguments for this node. This includes:
        * Positional only arguments
        * Positional arguments
        * Keyword arguments
        * Variable arguments (.e.g *args)
        * Variable keyword arguments (e.g **kwargs)
        r   )	r   	itertoolschainr  r  r)  r   r  r*  )r   retvals     r=   	argumentszArguments.arguments  s     iot'7'=2bRRSS 	,MM$*+++$/'R'? 	+MM$/***r?   skippable_namesr<  set[str] | Noner   c               X   g }g }| j         }| j         rW| j        pg }| j         t          |           d         }| j         dt          | j                   t          |          z
           }| j        rE|                    t          | j        || j        |                     |                    d           | j        r:|                    t          | j        |t          | dd          |                     | j        r|                    d| j                    | j	        rQ| j        s|                    d           |                    t          | j	        | j
        | j        |                     | j        r|                    d| j                    d                    |          S )zoGet the arguments formatted as string.

        :returns: The formatted arguments.
        :rtype: str
        Nr;  /r   ***, )r  r  lenr  r   _format_argsr  getattrr!  r  r  r  r"  join)r   r<  resultpositional_only_defaultspositional_or_keyword_defaultsr  s         r=   format_argszArguments.format_args1  s    #% )-&= 	W9?D-1]CII:<<-H*'+}5Us4=7I7ICPTII7U5U'V$ 		MM$,0$3	     MM#9 	MMI2D-66$3	     ; 	-MM+dk++,,,? 
	; #c"""MMO$/$3	     : 	-MM+tz++,,,yy   r?   Ytuple[dict[str, tuple[str | None, str | None]], dict[str, tuple[str | None, str | None]]]c                   i }i }g }| j         }| j         rW| j        pg }| j         t          |           d         }| j         dt          | j                   t          |          z
           }t          | j                  D ]R\  }}| j        |         d}	}||                                }|r||                                         }	||	f||j        <   St          | j                  D ]\  }}
| j        |         d}	}||                                }|rQt          | j                  t          |          z
  }||z
  }|dk    r"||         ||                                         }	||	f||
j        <   | j	        r)| j
        }||                                }|df|| j	        <   t          | j                  D ]W\  }}| j        |         }||                                }| j        |         }	|	|	                                }	||	f||j        <   X| j        r)| j        }||                                }|df|| j        <   ||fS )ay  Get the arguments as dictionary with information about typing and defaults.

        The return tuple contains a dictionary for positional and keyword arguments with their typing
        and their default value, if any.
        The method follows a similar order as format_args but instead of formatting into a string it
        returns the data that is used to do so.
        N)r  r  rC  	enumerater  r  	as_stringr   r   r!  r  r  r  r  r"  r  )r   pos_onlykw_onlyrH  rI  r  rx   posonly
annotationdefaultargdefaults_offsetdefault_indexr"  s                 r=   _get_arguments_datazArguments._get_arguments_datac  s    >@<> $& )-&= 	W9?D-1]CII:<<-H*'+}5Us4=7I7ICPTII7U5U'V$'(899 	; 	;NE7"&">u"EtJ%'1133
' F259CCEE&0'%:HW\""#DI.. 	7 	7JE3"&"25"94J%'1133
- X"%di..37U3V3V"V % 7!B&&6}EQ<]KUUWWG",g!6HSX; 	7.J%'1133
%/$6HT[!%do66 	8 	8LE54U;J%'1133
&u-G"!++--#-w"7GEJ: 	5-J%'1133
#-t"4GDJ  r?   c                     fd j         D             }t          | j                  d         }|Ht           j                  |k    r0 j        |          j        |         S t           j        |          t          ||          d         }|O|t          |          t           j                  z
  t           j                  z
  z
  }|dk    r j        |         S t           j        |          )zGet the default value for an argument.

        :param argname: The name of the argument to get the default value for.
        :type argname: str

        :raises NoDefault: If there is no default value defined for the
            given argument.
        c                >    g | ]}|j         j        j        fv|S r   )r   r!  r"  )r}   rU  r   s     r=   r   z+Arguments.default_value.<locals>.<listcomp>  s5     
 
 
SXdk4:=V-V-VC-V-V-Vr?   r   N)funcr   )r:  	_find_argr  rC  r  r"   r   r  )r   argnamer  rx   idxs   `    r=   default_valuezArguments.default_value  s   
 
 
 
>
 
 
 '4?33A6C(8$9$9E$A$A&2'..7;;;;'4((+3t99s4='9'99C@P<Q<QQRCaxx}S))T[w7777r?   r5   c                p    || j         k    rdS || j        k    rdS |                     |          d         duS )zCheck if the given name is defined in the arguments.

        :param name: The name to check for.
        :type name: str

        :returns: Whether the given name is defined in the arguments,
        TrX   N)r!  r"  find_argnamer   r   s     r=   is_argumentzArguments.is_argument  sF     4;44:4  &&q)55r?   c                    |t           k    rt          j        dt          d           | j        rt          || j                  \  }}|r||fS dS )a  Get the index and :class:`AssignName` node for given name.

        :param argname: The name of the argument to search for.
        :type argname: str

        :returns: The index and node for the argument.
        :rtype: tuple(str or None, AssignName or None)
        z0The rec argument will be removed in astroid 3.1.   
stacklevelNN)r  warningswarnDeprecationWarningr:  r\  )r   r]  recrx   arguments        r=   ra  zArguments.find_argname  sj     ---MB"   
 > 	''@@OE8 'h&zr?   c              #  L  K   | j         pdE d {V  | j        D ]}||V  	| j        pdE d {V  | j        | j        E d {V  | j        E d {V  | j        pdD ]}||V  	| j        D ]}||V  	| j        	| j        V  | j        	| j        V  | j	        D ]}||V  	d S )Nr   )
r  r  r  r  r  r  r   r  r  r  )r   rS   s     r=   r   zArguments.get_children  sC     #)r)))))))/ 	 	C			9?"""""""=$}$$$$$$$?"""""""#)r 	 	C			# 	 	C			 ,''''+&&&&. 	 	C				 	r?   r   nodes.ArgumentsrG   rH   r   r
   &Generator[InferenceResult, None, None]c                f    ddl m} ||j        t          | |           || |j        |          S )Nr   )_arguments_infer_argnamerJ   )astroid.protocolsrr  r   r    )r   rG   r   rr  s       r=   r   zArguments._infer  sN    
 	?>>>>>?g08 dG<<<<''g.@'JJJr?   rh  )r!  r+  r"  r+  r   r)   r)  r(  r*  r(  r4   r   )NNNNN)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&  r4   r   )r4   rt   r<  r=  r4   r   )r4   rK  r4   r5   r7   )r   ro  rG   rH   r   r
   r4   rp  )r   r   r   r   r   r  __annotations__r   r   r   arguments_assigned_stmtsr   r2  r   r4  r:  rJ  rX  r_  rc  r  ra  r   r   r   r   r   r   s   @r=   r  r  `  s         .O  (M!!!! "!!!K    C!!!!=++++V$$$$L0000Q////O**** 1000 2111 $###@""""H""""0!!!!1 *.(,% % % % % % %J +/)-8<>B?C$A $A $A $A $AL 7N  
 8 8 8 8 8 _8   _" AE 0! 0! 0! 0! 0! 0!dC! C! C! C!J8 8 866 6 6 6 )D    *  > )BFK K K K *)K K K K Kr?   r  c                R    t          |          D ]\  }}|j        | k    r||fc S dS )Nrh  )rN  r   )r]  r  irU  s       r=   r\  r\    s?    D//  38wc6MMM :r?   r<  r=  r   c                   |t                      }g }| dS |g }|t          |           t          |          z
  }t          j        | |          }t	          |          D ]\  }\  }}	|j        |v rt          |t                    r,|                    dt          |j
                   d           S|j        }
d}|	|
d|	                                z   z  }
d}|                    |
           |?||k    r9|||z
           .|dxx         ||||z
                                           z   z  cc<   d                    |          S )	N ()=z: z = rM  rB  )setrC  r7  zip_longestrN  r   r8   rD   r   rD  rL   rO  rF  )r  r  r   r<  r   default_offsetpackedry  rU  rS  r]  default_seps               r=   rD  rD    st    %%F|rTS]]2"455F )& 1 1 Y YC8&&c5!! 	YMM7l38447778888hGK%4*"6"6"8"888#MM'"""#^(;(;A./;2JJJ+^9K0L0V0V0X0X"XXJJJ99Vr?   rK   "nodes.AssignAttr | nodes.Attributer   r
   4Generator[InferenceResult, None, InferenceErrorInfo]c              +  x  K   ddl m} ddlm} | j                            |          D ] }t          |t          j                  r|V  "t          |          }|j
        }	 ||_
        t          ||t          f          r3t          ||          r|n|j        } || |          |j        | j        <   | j        dk    r|j        dk    rt          j        V  n!|                    | j        |          E d{V  n# t$          t&          t(          f$ r Y nw xY w||_
        # ||_
        w xY wt+          | |          S )	zMInfer an AssignAttr/Attribute node by using getattr on the associated object.r   r   ClassDef)r   argvsysNrJ   )r   r   astroid.nodesr  exprrP   r8   r   rQ   r   	boundnoder   _proxiedr   attrnamer   rM   igetattrr   r    AttributeErrorr+   )rK   rG   r   r   r  ownerold_boundnoder   s           r=   _infer_attributer  8  s      322222&&&&&&)) . .eT122 	KKKw'')	. %G%(H!566 X!+E8!<!<P%.5D_TQV5W5W5W#DM2}&&5:+>+> &&&&& >>$-AAAAAAAAA#
 	 	 	
 D	 !.GG----49999s+   "BC:9D:DDDD	D(c                       e Zd ZU dZded<   dZdZd fdZddZe	j
        Z	 d Zej        ej        	 ddd                        Zej        ej        	 ddd                        Z xZS ) rF   a  Variation of :class:`ast.Assign` representing assignment to an attribute.

    >>> import astroid
    >>> node = astroid.extract_node('self.attribute = range(10)')
    >>> node
    <Assign l.1 at 0x7effe1d521d0>
    >>> list(node.get_children())
    [<AssignAttr.attribute l.1 at 0x7effe1d52320>, <Call l.1 at 0x7effe1d522e8>]
    >>> list(node.get_children())[0].as_string()
    'self.attribute'
    r)   r  r  r  r  r   r   rt   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r  r   r   r   r  r   r   r   r   r   r   s          r=   r   zAssignAttr.__init__q  sI     !:!!) 	 	
 	
 	
 	
 	
r?   c                    || _         d S r7   r  r   r  s     r=   r   zAssignAttr.postinit  r   r?   c              #     K   | j         V  d S r7   r  r   s    r=   r   zAssignAttr.get_children        ir?   NrG   rH   r   r
   r   c                    t          | j        t                    r| j                            |          S t	          |                     |                    }t          ||          S )zVInfer an AssignAttr: need to inspect the RHS part of the
        assign node.
        rr   r   r   s       r=   r   zAssignAttr._infer  r   r?   c                    t          | |fi |S r7   r  r   rG   r   s      r=   r  zAssignAttr.infer_lhs      
  g88888r?   r  r   r   rt   r   rt   r   r)   r   r   r   r   r4   r   r  r)   r4   r   r7   r  )r   r   r   r   rv  r   r  r   r   r   r  r   r   r   r   r  r   r  r   r   s   @r=   rF   rF   _  s        
 
 LLLO!M
 
 
 
 
 
*    4N   )15
, 
, 
, 
,  *)
, )159 9 9 9  *)9 9 9 9 9r?   rF   c                  >    e Zd ZU dZdZded<   	 ded<   	 dd	Zd
 ZdS )Asserta  Class representing an :class:`ast.Assert` node.

    An :class:`Assert` node represents an assert statement.

    >>> import astroid
    >>> node = astroid.extract_node('assert len(things) == 10, "Not enough things"')
    >>> node
    <Assert l.1 at 0x7effe1d527b8>
    rY   failr)   rY   r   r  r4   r   c                "    || _         || _        d S r7   )r  rY   )r   rY   r  s      r=   r   zAssert.postinit  s    				r?   c              #  @   K   | j         V  | j        | j        V  d S d S r7   r  r   s    r=   r   zAssert.get_children  s0      i9 )OOOOO ! r?   N)rY   r)   r  r   r4   r   r   r   r   r   r   rv  r   r   r   r?   r=   r  r    se           'OLLL65       r?   r  c                      e Zd ZU dZded<   	 ded<   	 ded<   	 dZd	ZddZej	        Z
	 d Zedd            Zd Zd ZdS )Assigna  Class representing an :class:`ast.Assign` node.

    An :class:`Assign` is a statement where something is explicitly
    asssigned to.

    >>> import astroid
    >>> node = astroid.extract_node('variable = range(10)')
    >>> node
    <Assign l.1 at 0x7effe1db8550>
    list[NodeNG]targetsr)   r<   r   type_annotationr  r<   r  r4   r   c                0    || _         || _        || _        d S r7   )r  r<   r  )r   r  r<   r  s       r=   r   zAssign.postinit  s      
.r?   c              #  6   K   | j         E d {V  | j        V  d S r7   r  r   s    r=   r   zAssign.get_children  s4      <jr?   list[nodes.Assign]c                     | g| j         j        S r7   )r<   _assign_nodes_in_scoper   s    r=   r  zAssign._assign_nodes_in_scope  s    9tz899r?   c              #  H   K   | j                                         E d {V  d S r7   )r<   _get_yield_nodes_skip_functionsr   s    r=   r  z&Assign._get_yield_nodes_skip_functions  s2      :==???????????r?   c              #  H   K   | j                                         E d {V  d S r7   )r<   _get_yield_nodes_skip_lambdasr   s    r=   r  z$Assign._get_yield_nodes_skip_lambdas  s2      :;;===========r?   N)r  r  r<   r)   r  r   r4   r   )r4   r  )r   r   r   r   rv  r   _other_other_fieldsr   r   assign_assigned_stmtsr   r   r   r  r  r  r   r?   r=   r  r    s         	 	 $MMM4""""T*O./ / / / 4N  
 : : : _:@ @ @> > > > >r?   r  c                  j    e Zd ZU dZdZdZded<   	 ded<   	 ded	<   	 d
ed<   	 ddZej	        Z
	 d ZdS )	AnnAssigna  Class representing an :class:`ast.AnnAssign` node.

    An :class:`AnnAssign` is an assignment with a type annotation.

    >>> import astroid
    >>> node = astroid.extract_node('variable: List[int] = range(10)')
    >>> node
    <AnnAssign l.1 at 0x7effe1d4c630>
    targetrS  r<   )simpleName | Attribute | Subscriptr  r)   rS  r   r<   rt   r  r4   r   c                >    || _         || _        || _        || _        d S r7   )r  rS  r<   r  )r   r  rS  r  r<   s        r=   r   zAnnAssign.postinit  s$     $
r?   c              #  R   K   | j         V  | j        V  | j        | j        V  d S d S r7   r  r   s    r=   r   zAnnAssign.get_children'  sF      ko:!* "!r?   N)
r  r  rS  r)   r  rt   r<   r   r4   r   )r   r   r   r   r   r  rv  r   r   assign_annassigned_stmtsr   r   r   r?   r=   r  r    s           8OM(((($;4KKKG
 
 
 
 7N    r?   r  c                       e Zd ZU dZdZdZded<   	 ded<   	 d$ fdZd%dZe	j
        Z	 d&d'dZd Z fdZ fdZ	 d&d(dZej        ej        	 d&d)d#                        Z xZS )*r   zClass representing an :class:`ast.AugAssign` node.

    An :class:`AugAssign` is an assignment paired with an operator.

    >>> import astroid
    >>> node = astroid.extract_node('variable += 1')
    >>> node
    <AugAssign l.1 at 0x7effe1db4d68>
    r  r<   opr  r  r)   r<   r  r   r   rt   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r  r   r   r   r  r   r   r   r   r   r   s          r=   r   zAugAssign.__init__E  sM     	
 	!!) 	 	
 	
 	
 	
 	
r?   c                "    || _         || _        d S r7   r  r   r  r<   s      r=   r   zAugAssign.postinit]      


r?   NrG   rH   c                l    	 |                      |          }d |D             S # t          $ r g cY S w xY w)a&  Get a list of type errors which can occur during inference.

        Each TypeError is represented by a :class:`BadBinaryOperationMessage` ,
        which holds the original exception.

        :returns: The list of possible type errors.
        :rtype: list(BadBinaryOperationMessage)
        rr   c                F    g | ]}t          |t          j                  |S r   r8   r   BadBinaryOperationMessager}   rG  s     r=   r   z)AugAssign.type_errors.<locals>.<listcomp>q  ;       fd&DEE  r?   )_infer_augassignr    r   rG   resultss      r=   type_errorszAugAssign.type_errorsf  sd    	++G+<<G %   
  	 	 	III	   !$ 33c              #  .   K   | j         V  | j        V  d S r7   r  r   s    r=   r   zAugAssign.get_childreny  s(      kjr?   c              #     K   | j                                         E d{V  t                                                      E d{V  dS z7An AugAssign node can contain a Yield node in the valueN)r<   r  r   r   r   s    r=   r  z)AugAssign._get_yield_nodes_skip_functions}  s[      :==?????????77::<<<<<<<<<<<r?   c              #     K   | j                                         E d{V  t                                                      E d{V  dS r  )r<   r  r   r  s    r=   r  z'AugAssign._get_yield_nodes_skip_lambdas  s[      :;;=========7788:::::::::::r?   GGenerator[InferenceResult | util.BadBinaryOperationMessage, None, None]c              #    K   |pt                      }|                                }| j                            |          }| j                            |          }t          j        ||          D ]u\  }}t          d ||fD                       rt          j
        V   dS 	 |                     ||| || j                  E d{V  X# t          $ r t          j
        V  Y rw xY wdS )z0Inference logic for augmented binary operations.rr   c              3  J   K   | ]}t          |t          j                  V  d S r7   r8   r   rQ   r}   r<   s     r=   r   z-AugAssign._infer_augassign.<locals>.<genexpr>  /      SSu:eT%9::SSSSSSr?   N)leftrightbinary_opnoderG   flow_factory)r   cloner  r  r<   rP   r7  productrb   r   rM   _infer_binary_operation_get_aug_flowr$   )r   rG   rhs_contextlhs_iterrhs_iterlhsrhss          r=   r  zAugAssign._infer_augassign  sB      /-//mmoo;(((99:##K#88!)(H== 	' 	'HCSSc
SSSSS &&&&	'77"&#!%!3 8           . ' ' '&&&&&&'	' 	's   $%C

C%$C%r   nodes.AugAssignr   r
   rp  c                N    |                      | j        |t          j                  S r7   )_filter_operation_errorsr  r   r  r  s      r=   r   zAugAssign._infer  s)    
 ,,!7D,J
 
 	
r?   r  r   r   rt   r   rt   r   r)   r   r   r   r   r4   r   )r  r  r<   r)   r4   r   r7   rG   rH   )rG   rH   r4   r  )r   r  rG   rH   r   r
   r4   rp  )r   r   r   r   r   r  rv  r   r   r   r  r   r  r   r  r  r  r   r   r  r   r   r   s   @r=   r   r   /  sE          *OM(((($MMM3
 
 
 
 
 
0    4N    &  = = = = =
; ; ; ; ; 26' ' ' ' '8 )BF
 
 
 
  *)
 
 
 
 
r?   r   c                       e Zd ZU dZdZdZded<   	 ded<   	 d# fdZd$dZd%d&dZ	d Z
d Zd'dZ	 d%d(dZej        ej        	 d%d)d"                        Z xZS )*BinOpzClass representing an :class:`ast.BinOp` node.

    A :class:`BinOp` node is an application of a binary operator.

    >>> import astroid
    >>> node = astroid.extract_node('a + b')
    >>> node
    <BinOp l.1 at 0x7f23b2e8cfd0>
    r  r  r  r)   r  r  r  r   r   rt   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r  r  s          r=   r   zBinOp.__init__  I     !!) 	 	
 	
 	
 	
 	
r?   c                "    || _         || _        d S r7   r  )r   r  r  s      r=   r   zBinOp.postinit      	


r?   NrG   rH   c                l    	 |                      |          }d |D             S # t          $ r g cY S w xY w)a%  Get a list of type errors which can occur during inference.

        Each TypeError is represented by a :class:`BadBinaryOperationMessage`,
        which holds the original exception.

        :returns: The list of possible type errors.
        :rtype: list(BadBinaryOperationMessage)
        rr   c                F    g | ]}t          |t          j                  |S r   r  r  s     r=   r   z%BinOp.type_errors.<locals>.<listcomp>  r  r?   )_infer_binopr    r  s      r=   r  zBinOp.type_errors  sd    	'''88G %   
  	 	 	III	r  c              #  .   K   | j         V  | j        V  d S r7   r  r   s    r=   r   zBinOp.get_children  s%      ijr?   c                &    t           | j                 S r7   r(   r  r   s    r=   op_precedencezBinOp.op_precedence      TW%%r?   r5   c                    | j         dk    S )NrA  r  r   s    r=   op_left_associativezBinOp.op_left_associative  s    w$r?   r   r
   rp  c              +    K   | j         }| j        }|pt                      }t          |          }t          |          }|                    |          }|                    |          }t          j        ||          D ]t\  }	}
t          d |
|	fD                       rt          j	        V   dS 	 | 
                    |	|
| || j                  E d{V  W# t          $ r t          j	        V  Y qw xY wdS )z!Binary operation inference logic.rr   c              3  J   K   | ]}t          |t          j                  V  d S r7   r  r  s     r=   r   z%BinOp._infer_binop.<locals>.<genexpr>  r  r?   N)r  r  r   r   rP   r7  r  rb   r   rM   r  _get_binop_flowr$   )r   rG   r   r  r  lhs_contextr  r  r  r  r  s              r=   r  zBinOp._infer_binop  sL      y

 /-//"7++"7++::k:22;;{;33!)(H== 	' 	'HCSSc
SSSSS &&&&'77dGT-A          . ' ' '&&&&&&'	' 	's   2$CC21C2r   nodes.BinOpc                N    |                      | j        |t          j                  S r7   )r  r  r   r  r  s      r=   r   zBinOp._infer  s)    
 ,,w(F
 
 	
r?   r  )r  r)   r  r)   r4   r   r7   r  ru  rG   rH   r   r
   r4   rp  )r   r  rG   rH   r   r
   r4   rp  )r   r   r   r   r   r  rv  r   r   r  r   r  r
  r  r   yes_if_nothing_inferredr  r   r   r   s   @r=   r  r    s$          (OMLLLAMMMB
 
 
 
 
 
*       &  & & &   
 26' ' ' ' '8 '>B
 
 
 
  ('
 
 
 
 
r?   r  c                       e Zd ZdZdZdZ	 	 	 ddddd  fdZd!d"dZd Zd Z	e
j        e
j        	 d!d#d                        Z xZS )$BoolOpzClass representing an :class:`ast.BoolOp` node.

    A :class:`BoolOp` is an application of a boolean operator.

    >>> import astroid
    >>> node = astroid.extract_node('a and b')
    >>> node
    <BinOp l.1 at 0x7f23b2e71c50>
    r   r  Nr   r   r  r   r   r   r   r   r   r   r   r4   r   c               t    || _         	 g | _        	 t                                          |||||           dS )a  
        :param op: The operator.

        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   N)r  r   r   r   r  s          r=   r   zBoolOp.__init__,  sS    2 $&7!!) 	 	
 	
 	
 	
 	
r?   r   r$  c                    |	|| _         dS dS )znDo some setup after initialisation.

        :param values: The values being applied to the operator.
        Nr  r   r   s     r=   r   zBoolOp.postinitS  s    
  DKKK r?   c              #  $   K   | j         E d {V  d S r7   r  r   s    r=   r   zBoolOp.get_children[  &      ;r?   c                &    t           | j                 S r7   r  r   s    r=   r  zBoolOp.op_precedence^  r  r?   r   nodes.BoolOprG   rH   r   r
   r   c              +  &  K   | j         }| j        dk    rt          j        }nt          j        }	 fd|D             }n# t
          $ r t          j        V  Y dS w xY wt          j	        | D ]}t          d |D                       rt          j        V  *d |D             }t          d |D                       rt          j        V  ^t          j        }t          ||          D ]\  }}	 ||	          r|V   n|V  t          |           S )zInfer a boolean operation (and / or / not).

        The function will calculate the boolean operation
        for all pairs generated through inference for each component
        node.
        orc                <    g | ]}|                                S )rr   )rP   )r}   r<   rG   s     r=   r   z!BoolOp._infer.<locals>.<listcomp>s  s'    PPPu{{7{;;PPPr?   Nc              3  J   K   | ]}t          |t          j                  V  d S r7   r  r}   items     r=   r   z BoolOp._infer.<locals>.<genexpr>y  s/      KKd:dD$899KKKKKKr?   c                6    g | ]}|                                 S r   )r   r"  s     r=   r   z!BoolOp._infer.<locals>.<listcomp>~  s"    >>>4??,,>>>r?   c              3  J   K   | ]}t          |t          j                  V  d S r7   r  r"  s     r=   r   z BoolOp._infer.<locals>.<genexpr>  s/      RRd:dD$899RRRRRRr?   rJ   )r   r  operatortruthnot_r    r   rM   r7  r  rb   zipr+   )
r   rG   r   r   	predicateinferred_valuespairbool_valuesr<   r   s
    `        r=   r   zBoolOp._infera  sv      7d?? II I	PPPPPPPOO 	 	 	""""44	 %7 	 	DKKdKKKKK &&&&>>>>>KRRkRRRRR &&&& $E%({%;%;  !z9Z(( KKKE !tW====s   ? AANNN)r  r   r   r   r   r   r   r   r   r   r   r   r4   r   r7   r   r$  r4   r   )r   r  rG   rH   r   r
   r4   r   )r   r   r   r   r   r  r   r   r   r  r   r   r  r   r   r   s   @r=   r  r    s          "OM
 "!% $%
 "&%)%
 %
 %
 %
 %
 %
 %
 %
N! ! ! ! !  & & & )?C2> 2> 2> 2>  *)2> 2> 2> 2> 2>r?   r  c                      e Zd ZdZdS )BreakzClass representing an :class:`ast.Break` node.

    >>> import astroid
    >>> node = astroid.extract_node('break')
    >>> node
    <Break l.1 at 0x7f23b2e9e5c0>
    Nr   r   r   r   r   r?   r=   r1  r1               r?   r1  c                      e Zd ZU dZdZded<   	 ded<   	 ded<   	 ddZedd            Zedd            Z	d Z
ej        ej        	 ddd                        ZddZdS )CallzClass representing an :class:`ast.Call` node.

    A :class:`Call` node is a call to a function, method, etc.

    >>> import astroid
    >>> node = astroid.extract_node('function()')
    >>> node
    <Call l.1 at 0x7f23b2e71eb8>
    r[  r  keywordsr)   r[  r  r  list[Keyword]r7  r4   r   c                0    || _         || _        || _        d S r7   r6  )r   r[  r  r7  s       r=   r   zCall.postinit  s     		 r?   list[Starred]c                $    d | j         D             S )z/The positional arguments that unpack something.c                <    g | ]}t          |t                    |S r   )r8   r   )r}   rU  s     r=   r   z!Call.starargs.<locals>.<listcomp>  s'    EEEJsG,D,DEEEEr?   )r  r   s    r=   starargszCall.starargs  s     FEtyEEEEr?   c                $    d | j         D             S )z,The keyword arguments that unpack something.c                     g | ]}|j         	|S r7   rU  )r}   keywords     r=   r   zCall.kwargs.<locals>.<listcomp>  s    LLLG8K8K8K8Kr?   )r7  r   s    r=   r   zCall.kwargs  s     MLt}LLLLr?   c              #  P   K   | j         V  | j        E d {V  | j        E d {V  d S r7   r6  r   s    r=   r   zCall.get_children  sK      i9=         r?   NrG   rH   r   r
   r  c              +    K   t          |          }d|_        |,|                     |                                          |_        | j                            |          D ]}t          |t          j	                  r|V  !	 t          |d          r>t          | j        | j        |          |_        |                    | |          E d{V  q# t           $ r Y }w xY wt#          | |          S )z?Infer a Call node by trying to guess what the function returns.Ninfer_call_result)r  r7  callee)callerrG   rJ   )r   r  _populate_context_lookupr  extra_contextr[  rP   r8   r   rQ   r   r   r  r7  callcontextrD  r    r+   )r   rG   r   rI  rE  s        r=   r   zCall._infer  s1      #7++ $(,(E(Egmmoo(V(VK%ioog.. 	 	F&$"677 	6#677 .9!Yv/ / /K+  &77#[  8            "   !tW====s   AC
CCc                    i }||S | j         D ]'}t          |t                    r|||j        <   "|||<   (| j        | j        ng }|D ]}|||j        <   |S )zEAllows context to be saved for later for inference inside a function.)r  r8   r   r<   r7  )r   rG   context_lookuprU  r7  rA  s         r=   rG  zCall._populate_context_lookup  s    BD?!!9 	. 	.C#w'' .,3sy))&-s##$(M$=4==2 	4 	4G,3N7=))r?   )r[  r)   r  r  r7  r8  r4   r   )r4   r:  )r4   r8  r7   rG   rH   r   r
   r4   r  r  )r   r   r   r   r   rv  r   propertyr=  r   r   r   r   r  r   rG  r   r?   r=   r5  r5    s
          3OLLL;8! ! ! ! F F F XF M M M XM! ! ! )15> > > >  *)>2     r?   r5  c                
    | |v S r7   r   abs     r=   <lambda>rR    s
    qAv r?   c                
    | |vS r7   r   rO  s     r=   rR  rR    s
    1A: r?   )z==z!=<z<=>z>=inznot inz%dict[str, Callable[[Any, Any], bool]]COMPARE_OPSiszis notc                  p    e Zd ZU dZdZded<   	 ded<   	 dd	Zd
 Zd Ze	dd            Z
ddZ	 d d!dZdS )"CompareaL  Class representing an :class:`ast.Compare` node.

    A :class:`Compare` node indicates a comparison.

    >>> import astroid
    >>> node = astroid.extract_node('a <= b <= c')
    >>> node
    <Compare l.1 at 0x7f23b2e9e6d8>
    >>> node.ops
    [('<=', <Name.b l.1 at 0x7f23b2e9e2b0>), ('<=', <Name.c l.1 at 0x7f23b2e9e390>)]
    r  opsr)   r  list[tuple[str, NodeNG]]r\  r4   r   c                "    || _         || _        d S r7   r[  )r   r  r\  s      r=   r   zCompare.postinit   s    	r?   c              #  >   K   | j         V  | j        D ]	\  }}|V  
dS )zGet the child nodes below this node.

        Overridden to handle the tuple fields and skip returning the operator
        strings.

        :returns: The children.
        :rtype: iterable(NodeNG)
        Nr[  )r   r   
comparators      r=   r   zCompare.get_children$  sA       i!X 	 	MAz	 	r?   c                (    | j         d         d         S )zsAn optimized version of list(get_children())[-1]

        :returns: The last child.
        :rtype: NodeNG
        rM  rX   )r\  r   s    r=   
last_childzCompare.last_child1  s     x|Ar?   rK   r-   r
   c                N    t          j        |                                           S r7   )astliteral_evalrO  )rK   s    r=   _to_literalzCompare._to_literal<  s    
  0 0111r?   	left_iterIterable[InferenceResult]r  r   
right_iterbool | util.UninferableBasec                @   d}|t           v rt          j        S t          |         }t	          j        ||          D ]\  }}t          |t          j                  st          |t          j                  rt          j        c S 	 |                     |          |                     |          }}n+# t          t          t          f$ r t          j        cY c S w xY w	  |||          }n# t          $ r}	t          |	d}	~	ww xY w||}||k    rt          j        c S |J |S )a  
        If all possible combinations are either True or False, return that:
        >>> _do_compare([1, 2], '<=', [3, 4])
        True
        >>> _do_compare([1, 2], '==', [3, 4])
        False

        If any item is uninferable, or if some combinations are True and some
        are False, return Uninferable:
        >>> _do_compare([1, 3], '<=', [2, 4])
        util.Uninferable
        N)UNINFERABLE_OPSr   rM   rW  r7  r  r8   rQ   rf  SyntaxErrorr   r  r   r   )
r   rg  r  ri  r9  op_funcr  r  r  r   s
             r=   _do_comparezCompare._do_compareC  se   $ #  ##b/$,Y
CC 	( 	(KD%$ 455 (t+: : ( ''''("..t44d6F6Fu6M6Me^< ( ( (''''''(0wtU++ 0 0 0&C/0 ~4''''   !!!s*   *B--#CCC&&
C=0C88C=NrG   rH   r   9Generator[nodes.Const | util.UninferableBase, None, None]c              +    K   d}| j         }| j        }t          |                    |                    }|D ]f\  }}t          |                    |                    }		 |                     |||	          }n# t
          $ r t          j        }Y  nw xY w|dur n|	}g|t          j        u r|V  dS t          |          V  dS )z#Chained comparison inference logic.Trr   N)	r\  r  r   rP   ro  r   r   rM   rs   )
r   rG   r   r9  r\  	left_noder  r  
right_noder  s
             r=   r   zCompare._infers  s       /3hI	9??7?3344! 
	 
	NB
z'''8899C))#r377#   ) T!!CCT%%%LLLLL--s   !A99BB)r  r)   r\  r]  r4   r   )rK   r-   r4   r
   )rg  rh  r  r   ri  rh  r4   rj  r7   )rG   rH   r   r
   r4   rp  )r   r   r   r   r   rv  r   r   rb  staticmethodrf  ro  r   r   r?   r=   rZ  rZ    s         
 
 &OLLLG!!!!M        2 2 2 \2. . . .b 26             r?   rZ  c                  ~    e Zd ZU dZdZdZdZ	 ded<   	 ded<   	 ded	<   	 d
ed<   	 ddZe	j
        Z	 d ZddZd ZdS )Comprehensiona  Class representing an :class:`ast.comprehension` node.

    A :class:`Comprehension` indicates the loop inside any type of
    comprehension including generator expressions.

    >>> import astroid
    >>> node = astroid.extract_node('[x for x in some_values]')
    >>> list(node.get_children())
    [<Name.x l.1 at 0x7f23b2e352b0>, <Comprehension l.1 at 0x7f23b2e35320>]
    >>> list(node.get_children())[1].as_string()
    'for x in some_values'
    r  iterifs)is_asyncTr)   r  rx  r  ry  r5   rz  r4   r   c                >    || _         || _        || _        || _        d S r7   )r  rx  ry  rz  )r   r  rx  ry  rz  s        r=   r   zComprehension.postinit  s$     	 r?   c                    | S )zwThe type of assignment that this node performs.

        :returns: The assignment type.
        :rtype: NodeNG
        r   r   s    r=   assign_typezComprehension.assign_type  s	     r?   mystmt_base_nodes.Statement | Nonec                    | |u r"t          |t          t          f          r|gdfS n|                                 |u r|gdfS |dfS )zmethod used in filter_stmtsTF)r8   rs   r  	statement)r   lookup_noderK   r   r~  s        r=   _get_filtered_stmtsz!Comprehension._get_filtered_stmts  sd     6>>+t}55 +#}d**+ ^^'' 64<e|r?   c              #  H   K   | j         V  | j        V  | j        E d {V  d S r7   rw  r   s    r=   r   zComprehension.get_children  s?      ki8r?   N)
r  r)   rx  r)   ry  r  rz  r5   r4   r   )r~  r  )r   r   r   r   r   r  optional_assignrv  r   r   for_assigned_stmtsr   r}  r  r   r   r?   r=   rv  rv    s           0O!MO:NNN3LLL5JNNN?
! 
! 
! 
! 1N          r?   rv  c                       e Zd ZdZdZ	 	 	 	 d dddd! fdZej        Zej	        Z
 fdZd"d#dZd$dZd Zd%dZd"d#dZ	 d"d&dZ xZS )'rs   a  Class representing any constant including num, str, bool, None, bytes.

    >>> import astroid
    >>> node = astroid.extract_node('(5, "This is a string.", True, None, b"bytes")')
    >>> node
    <Tuple.tuple l.1 at 0x7f23b2e358d0>
    >>> list(node.get_children())
    [<Const.int l.1 at 0x7f23b2e35940>,
    <Const.str l.1 at 0x7f23b2e35978>,
    <Const.bool l.1 at 0x7f23b2e359b0>,
    <Const.NoneType l.1 at 0x7f23b2e359e8>,
    <Const.bytes l.1 at 0x7f23b2e35a20>]
    )r<   kindNr  r<   r
   r   r   r   r   r   r  r+  r   r   r4   r   c                   || _         	 || _        	 t                                          |||||           t	          j        | d           dS )a}  
        :param value: The value that the constant represents.

        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param kind: The string prefix. "u" for u-prefixed strings and ``None`` otherwise. Python 3.8+ only.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   N)r<   r  r   r   r   )	r   r<   r   r   r   r  r   r   r   s	           r=   r   zConst.__init__  sd    8  
5 $	f!!) 	 	
 	
 	
 	$%%%%%r?   c                `    |dk    rt           t                                          |          S )Nr<   )r  r   __getattr__)r   r   r   s     r=   r  zConst.__getattr__  s,     7??  ww""4(((r?   rG   rH   c                V   t          |t                    r|j        }nGt          |t                    rt	          ||          }n t          dt          |           d          	 t          | j        t          t          f          rt          | j        |                   S no# t          $ r }t          d| j        d|          |d}~wt          $ r}t          d| ||          |d}~wt          $ r}t          d	| ||          |d}~ww xY wt          | d
| j         d          )a%  Get an item from this node if subscriptable.

        :param index: The node to use as a subscript index.
        :type index: Const or Slice

        :raises AstroidTypeError: When the given index cannot be used as a
            subscript index, or if this node is not subscriptable.
        rr   zCould not use type r   zCould not index z with NzIndex {index!r} out of ranger   r   z (value=r}  )r8   rs   r<   r   r   r   ru   r   bytesr   r   r   r   r   )r   rx   rG   index_valuer   s        r=   getitemzConst.getitem)  s    eU## 	+KKu%% 	&ug>>>KK #Fd5kkFFF  	$*sEl33 6TZ45556 	 	 	#F4:FF{FF   	 	 	#6	  
   	 	 	".TPW  	
 $??$*???@@@s0   &:B" "
D,CDC((D5D		Dr5   c                    dS )zCheck if the node has a custom __getattr__ or __getattribute__.

        :returns: Whether the class has a custom __getattr__ or __getattribute__.
            For a :class:`Const` this is always ``False``.
        Fr   r   s    r=   has_dynamic_getattrzConst.has_dynamic_getattrQ  s	     ur?   c                    t          | j        t                    rd | j        D             S t          dt	          | j                            )zAn iterator over the elements this node contains.

        :returns: The contents of this node.
        :rtype: iterable(Const)

        :raises TypeError: If this node does not represent something that is iterable.
        c                ,    g | ]}t          |          S r   )r   r|   s     r=   r   z Const.itered.<locals>.<listcomp>b  s     ???DM$''???r?   zCannot iterate over type )r8   r<   r   r   ru   r   s    r=   r   zConst.iteredY  sP     dj#&& 	@??DJ????HD4D4DHHIIIr?   r   c                4    | j                                         S )r   )r  qnamer   s    r=   r   zConst.pytypee  s    
 }""$$$r?   c                *    t          | j                  S zzDetermine the boolean value of this node.

        :returns: The boolean value of this node.
        :rtype: bool
        )r5   r<   r   s     r=   r   zConst.bool_valuel       DJr?   r   Iterator[Const]c              +     K   | V  d S r7   r   r  s      r=   r   zConst._infert         




r?   NNNN)r<   r
   r   r   r   r   r   r   r  r+  r   r   r   r   r4   r   r7   r  ru  r   )rG   rH   r   r
   r4   r  )r   r   r   r   r  r   r   const_infer_unary_opinfer_unary_opconst_infer_binary_opinfer_binary_opr  r  r  r   r   r   r   r   r   s   @r=   rs   rs     s/         &M
 "!% $*& "&%)*& *& *& *& *& *& *& *&X 3N5O	) 	) 	) 	) 	)&A &A &A &A &AP   
J 
J 
J% % % %          26        r?   rs   c                      e Zd ZdZdS )ContinuezClass representing an :class:`ast.Continue` node.

    >>> import astroid
    >>> node = astroid.extract_node('continue')
    >>> node
    <Continue l.1 at 0x7f23b2e35588>
    Nr2  r   r?   r=   r  r  z  r3  r?   r  c                  :    e Zd ZU dZdZded<   	 ddZdd	Zd
 ZdS )
Decoratorsa  A node representing a list of decorators.

    A :class:`Decorators` is the decorators that are applied to
    a method or function.

    >>> import astroid
    >>> node = astroid.extract_node('''
    @property
    def my_property(self):
        return 3
    ''')
    >>> node
    <FunctionDef.my_property l.2 at 0x7f23b2e35d30>
    >>> list(node.get_children())[0]
    <Decorators l.1 at 0x7f23b2e35d68>
    r1   r  r2   r4   r   c                    || _         d S r7   r1   )r   r2   s     r=   r   zDecorators.postinit      


r?   r3   c                    | j         st          |           | j         j         st          | j                   | j         j                                         S zThe first parent node defining a new scope.
        These can be Module, FunctionDef, ClassDef, Lambda, or GeneratorExp nodes.

        :returns: The first parent scope node.
        r  )r   r#   r   r   s    r=   r   zDecorators.scope  sV     { 	2$D1111{! 	9$DK8888{!'')))r?   c              #  $   K   | j         E d {V  d S r7   r1   r   s    r=   r   zDecorators.get_children  s&      :r?   N)r2   r  r4   r   r4   r3   )	r   r   r   r   r   rv  r   r   r   r   r?   r=   r  r    sm          " !O1   * * * *    r?   r  c                  H     e Zd ZU dZdZdZded<   	 d fdZddZd Z	 xZ
S )DelAttra  Variation of :class:`ast.Delete` representing deletion of an attribute.

    >>> import astroid
    >>> node = astroid.extract_node('del self.attr')
    >>> node
    <Delete l.1 at 0x7f23b2e35f60>
    >>> list(node.get_children())[0]
    <DelAttr.attr l.1 at 0x7f23b2e411d0>
    r  r  r)   r  r  r   r   rt   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r  r  s          r=   r   zDelAttr.__init__  sI     !>!!) 	 	
 	
 	
 	
 	
r?   c                    || _         d S r7   r  r  s     r=   r   zDelAttr.postinit  r   r?   c              #     K   | j         V  d S r7   r  r   s    r=   r   zDelAttr.get_children  r  r?   r  r  r   r   r   r   r   r  rv  r   r   r   r   r   s   @r=   r  r    s            O!MLLL-
 
 
 
 
 
*         r?   r  c                  6     e Zd ZdZdZd fdZddZd Z xZS )DeletezClass representing an :class:`ast.Delete` node.

    A :class:`Delete` is a ``del`` statement this is deleting something.

    >>> import astroid
    >>> node = astroid.extract_node('del self.attr')
    >>> node
    <Delete l.1 at 0x7f23b2e35f60>
    r  r   rt   r   r   r)   r   r   r   r4   r   c               d    g | _         	 t                                          |||||           d S r   )r  r   r   r   s         r=   r   zDelete.__init__  sI     &($!!) 	 	
 	
 	
 	
 	
r?   r  r  c                    || _         d S r7   r  )r   r  s     r=   r   zDelete.postinit      r?   c              #  $   K   | j         E d {V  d S r7   r  r   s    r=   r   zDelete.get_children 	  s&      <r?   )r   rt   r   rt   r   r)   r   r   r   r   r4   r   )r  r  r4   r   	r   r   r   r   r   r   r   r   r   r   s   @r=   r  r    sq          #O
 
 
 
 
 
(                r?   r  c                       e Zd ZdZdZd& fdZd'dZej        Z	d(dZ
d Zd Zd Z	 d)d*dZd)d+dZ	 d)d,d Zed-d$            Zd.d%Z xZS )/DictzClass representing an :class:`ast.Dict` node.

    A :class:`Dict` is a dictionary that is created with ``{}`` syntax.

    >>> import astroid
    >>> node = astroid.extract_node('{1: "1"}')
    >>> node
    <Dict.dict l.1 at 0x7f23b2e35cc0>
    itemsr   r   r   r   r   r   r   r4   r   c               d    g | _         	 t                                          |||||           d S r   )r  r   r   r   s         r=   r   zDict.__init__	  sK     EG
>!!) 	 	
 	
 	
 	
 	
r?   r  -list[tuple[InferenceResult, InferenceResult]]c                    || _         dS )ztDo some setup after initialisation.

        :param items: The key-value pairs contained in the dictionary.
        Nr  )r   r  s     r=   r   zDict.postinit%	  s    
 


r?   Literal['builtins.dict']c                    dS )r   zbuiltins.dictr   r   s    r=   r   zDict.pytype.	  	    
 r?   c              #  4   K   | j         D ]\  }}|V  |V  dS )zGet the key and value nodes below this node.

        Children are returned in the order that they are defined in the source
        code, key first then the value.

        :returns: The children.
        :rtype: iterable(NodeNG)
        Nr  )r   keyr<   s      r=   r   zDict.get_children5	  s;       * 	 	JCIIIKKKK	 	r?   c                :    | j         r| j         d         d         S dS )zAn optimized version of list(get_children())[-1]

        :returns: The last child, or None if no children exist.
        :rtype: NodeNG or None
        rM  rX   Nr  r   s    r=   rb  zDict.last_childB	  s$     : 	%:b>!$$tr?   c                $    d | j         D             S )zAn iterator over the keys this node contains.

        :returns: The keys of this node.
        :rtype: iterable(NodeNG)
        c                    g | ]\  }}|S r   r   )r}   r  r   s      r=   r   zDict.itered.<locals>.<listcomp>R	  s    ///a///r?   r  r   s    r=   r   zDict.iteredL	  s     0/DJ////r?   Nrx   Const | SlicerG   rH   r)   c                    | j         D ]\  }}t          |t                    r[t          j        ||          }t          |t
                    sE	 |                    ||          c S # t          t          f$ r Y qw xY w|	                    |          D ]]}t          |t          j
                  rt          |t                    r+t          |t                    r|j        |j        k    r|c c S ^t          |          )aT  Get an item from this node.

        :param index: The node to use as a subscript index.

        :raises AstroidTypeError: When the given index cannot be used as a
            subscript index, or if this node is not subscriptable.
        :raises AstroidIndexError: If the given index does not exist in the
            dictionary.
        )r  r8   
DictUnpackr   r   r  r  r   r   rP   rQ   rs   r<   )r   rx   rG   r  r<   inferred_valueinferredkeys          r=   r  zDict.getitemT	  s#    * 	% 	%JC#z** !%!@!@!.$77 )11%AAAAA(*;<   H  #yy11 % %k4+?@@ k511 %j6N6N %"(EK77$%  &&&s   A&&A:9A:c                *    t          | j                  S r  )r5   r  r   s     r=   r   zDict.bool_valueu	  r  r?   r   r
   Iterator[nodes.Dict]c              +  X  K   t          d | j        D                       s| V  d S |                     |          } t          |           | j        | j        | j        | j        | j                  }|	                    t          |                                                     |V  d S )Nc              3  F   K   | ]\  }}t          |t                    V  d S r7   )r8   r  )r}   kr   s      r=   r   zDict._infer.<locals>.<genexpr>	  s0      DDA:a,,DDDDDDr?   r   )rb   r  
_infer_mapru   r   r   r   r   r   r   r   )r   rG   r   r  r   s        r=   r   zDict._infer}	  s       DDDDDDD 	JJJJJOOG,,E d4jj{?{?#2  G T%++--00111MMMMMr?   lhs_dict:dict[SuccessfulInferenceResult, SuccessfulInferenceResult]rhs_dictc                    t          j        |                                 |                                          }d |D             }t          |                                          S )a*  Delete nodes that equate to duplicate keys.

        Since an astroid node doesn't 'equal' another node with the same value,
        this function uses the as_string method to make sure duplicate keys
        don't get through

        Note that both the key and the value are astroid nodes

        Fixes issue with DictUnpack causing duplicate keys
        in inferred Dict items

        :param lhs_dict: Dictionary to 'merge' nodes into
        :param rhs_dict: Dictionary with nodes to pull from
        :return : merged dictionary of nodes
        c                B    i | ]\  }}|                                 ||fS r   )rO  )r}   r  r<   s      r=   
<dictcomp>z1Dict._update_with_replacement.<locals>.<dictcomp>	  s*    TTT
UcmmooU|TTTr?   )r7  r8  r  dictr   )r  r  combined_dict
string_maps       r=   _update_with_replacementzDict._update_with_replacement	  sV    ( "(8(8(..:J:JKKTTmTTT
J%%''(((r?   c                   i }| j         D ]\  }}t          |t                    rpt          j        ||          }|st
          t          |t                    st          | |          |                    |          }|                     ||          }t          j        ||          }t          j        ||          }t          d ||fD                       rt          | |          |                     |||i          }|S )z%Infer all values based on Dict.items.rJ   rr   c              3     K   | ]}| V  d S r7   r   r|   s     r=   r   z"Dict._infer_map.<locals>.<genexpr>	  s$      >>D4x>>>>>>r?   )
r  r8   r  r   r   r    r  r  r  rb   )	r   rG   r   r   r<   double_starredunpack_itemsr  
safe_values	            r=   r  zDict._infer_map	  s%    NP: 	R 	RKD%$
++ R!%!@!@% )((!.$77 E(dGDDDD-88AA66v|LLodG<<<!_UGDDD
>>S*,=>>>>> E(dGDDDD66vZ?PQQr?   r   )r  r  r4   r   )r4   r  r7   )rx   r  rG   rH   r4   r)   r  )rG   rH   r   r
   r4   r  )r  r  r  r  r4   r  )rG   rH   r4   r  )r   r   r   r   r   r   r   r   dict_infer_unary_opr  r   r   rb  r   r  r   r   rt  r  r  r   r   s   @r=   r  r  	  s9         !O
 
 
 
 
 
(    2N       0 0 0 HL' ' ' ' 'B          26    " ) ) ) \)2       r?   r  c                  >    e Zd ZU dZdZded<   	 ddZd Zd	 Zd
 Z	dS )Expra6  Class representing an :class:`ast.Expr` node.

    An :class:`Expr` is any expression that does not have its value used or
    stored.

    >>> import astroid
    >>> node = astroid.extract_node('method()')
    >>> node
    <Call l.1 at 0x7f23b2e352b0>
    >>> node.parent
    <Expr l.1 at 0x7f23b2e35278>
    r;   r)   r<   r4   r   c                    || _         d S r7   r;   r   r<   s     r=   r   zExpr.postinit	  r  r?   c              #     K   | j         V  d S r7   r;   r   s    r=   r   zExpr.get_children	        jr?   c              #  d   K   | j         j        s!| j                                         E d {V  d S d S r7   )r<   is_functionr  r   s    r=   r  z$Expr._get_yield_nodes_skip_functions	  sL      z% 	DzAACCCCCCCCCCC	D 	Dr?   c              #  d   K   | j         j        s!| j                                         E d {V  d S d S r7   )r<   	is_lambdar  r   s    r=   r  z"Expr._get_yield_nodes_skip_lambdas	  sL      z# 	Bz??AAAAAAAAAAA	B 	Br?   Nr<   r)   r4   r   
r   r   r   r   r   rv  r   r   r  r  r   r?   r=   r  r  	  s|           !OMMM#     D D DB B B B Br?   r  c                       e Zd ZdZdZ	 	 	 ddddd fdZddZej        ej	        	 ddd                        Z
 xZS )	EmptyNodezAHolds an arbitrary object in the :attr:`LocalsDictNodeNG.locals`.Nr  r   r   r   r   r   r   r4   c               T    t                                          |||||           d S r   r   r   r   s         r=   r   zEmptyNode.__init__	  ?     	!!) 	 	
 	
 	
 	
 	
r?   r5   c                0    | j         d uo| j         t          uS r7   )objectr   r   s    r=   has_underlying_objectzEmptyNode.has_underlying_object	  s    {$&R4;>R+RRr?   rG   rH   r   r
   rp  c              +     K   |                                  st          j        V  d S 	 t                                          | j        |          E d {V  d S # t          $ r t          j        V  Y d S w xY w)Nrr   )r  r   rM   r&   infer_ast_from_somethingr  r   r  s      r=   r   zEmptyNode._infer	  s      
 ))++ 	'""""""')++DDK E              ' ' '&&&&&&&'s   .A A43A4r.  r   r   r   r   r   r   r   r   r   r   r4   r   ru  r7   r  )r   r   r   r   r  r   r  r   r   r  r   r   r   s   @r=   r  r  	  s        KKF 	
  #
 
 
 
 
 
 
 
"S S S S )15' ' ' '  *)' ' ' ' 'r?   r  c                  |    e Zd ZU dZdZdZded<   	 ded<   	 ded	<   	 ej        Z		 ddZ
d Zed             ZddZdS )ExceptHandlera  Class representing an :class:`ast.ExceptHandler`. node.

    An :class:`ExceptHandler` is an ``except`` block on a try-except.

    >>> import astroid
    >>> node = astroid.extract_node('''
        try:
            do_something()
        except Exception as error:
            print("Error!")
        ''')
    >>> node
    <Try l.2 at 0x7f23b2e9d908>
    >>> node.handlers
    [<ExceptHandler l.4 at 0x7f23b2e9e860>]
    ru   r   r[   r[   r   ru   r(  r   r  r[   r4   r   c                0    || _         || _        || _        d S r7   r  )r   ru   r   r[   s       r=   r   zExceptHandler.postinit0
  s     					r?   c              #  d   K   | j         	| j         V  | j        	| j        V  | j        E d {V  d S r7   r  r   s    r=   r   zExceptHandler.get_children:
  sL      9 )OOO9 )OOO9r?   c                \    | j         r| j         j        S | j        r| j        j        S | j        S PThe line on which the beginning of this block ends.

        :type: int
        )r   tolinenoru   r   r   s    r=   blockstart_tolinenoz!ExceptHandler.blockstart_tolinenoC
  s6     9 	&9%%9 	&9%%{r?   rU   rV   r5   c                ~    | j         dS t          fd| j                                         D                       S )zzCheck if this node handles any of the given

        :param exceptions: The names of the exceptions to check for.
        NTc              3  *   K   | ]}|j         v V  d S r7   r   )r}   rK   rU   s     r=   r   z&ExceptHandler.catch.<locals>.<genexpr>V
  s*      SSt49
*SSSSSSr?   )ru   rb   r  )r   rU   s    `r=   ra   zExceptHandler.catchO
  sH    
 9
 24SSSSty7P7P7R7RSSSSSSr?   N)ru   r   r   r(  r[   r  r4   r   rU   rV   r4   r5   )r   r   r   r   r   _multi_line_block_fieldsrv  r   excepthandler_assigned_stmtsr   r   r   r   r  ra   r   r?   r=   r  r  
  s          " /O(+<$;N      	 	 _	T T T T T Tr?   r  c                      e Zd ZU dZdZdZdZdZ	 ded<   	 ded<   	 d	ed
<   	 d	ed<   	 ded<   	 ddZ	e
j        Z	 ed             Zd ZdS )ForzClass representing an :class:`ast.For` node.

    >>> import astroid
    >>> node = astroid.extract_node('for thing in things: print(thing)')
    >>> node
    <For l.1 at 0x7f23b2e8cf28>
    r  rx  r[   r\   r  r[   r\   Tr)   r  rx  r  r[   r\   r   r  r4   r   c                L    || _         || _        || _        || _        || _        d S r7   )r  rx  r[   r\   r  )r   r  rx  r[   r\   r  s         r=   r   zFor.postinit
  s.     		.r?   c                    | j         j        S r  )rx  r  r   s    r=   r  zFor.blockstart_tolineno
       y!!r?   c              #  b   K   | j         V  | j        V  | j        E d {V  | j        E d {V  d S r7   r  r   s    r=   r   zFor.get_children
  sY      ki9;r?   N)r  r)   rx  r)   r[   r  r\   r  r  r   r4   r   )r   r   r   r   r   r  r	  r  rv  r   r   r  r   r   r  r   r   r?   r=   r  r  Y
  s         
  ;O.1O
 NNN#LLL&/9""""T/ / / / 1N " " _"    r?   r  c                      e Zd ZdZdS )AsyncFora  Class representing an :class:`ast.AsyncFor` node.

    An :class:`AsyncFor` is an asynchronous :class:`For` built with
    the ``async`` keyword.

    >>> import astroid
    >>> node = astroid.extract_node('''
    async def func(things):
        async for thing in things:
            print(thing)
    ''')
    >>> node
    <AsyncFunctionDef.func l.2 at 0x7f23b2e416d8>
    >>> node.body[0]
    <AsyncFor l.3 at 0x7f23b2e417b8>
    Nr2  r   r?   r=   r  r  
  s           r?   r  c                  2    e Zd ZU dZdZded<   	 d
dZd Zd	S )Awaita  Class representing an :class:`ast.Await` node.

    An :class:`Await` is the ``await`` keyword.

    >>> import astroid
    >>> node = astroid.extract_node('''
    async def func(things):
        await other_func()
    ''')
    >>> node
    <AsyncFunctionDef.func l.2 at 0x7f23b2e41748>
    >>> node.body[0]
    <Expr l.3 at 0x7f23b2e419e8>
    >>> list(node.body[0].get_children())[0]
    <Await l.3 at 0x7f23b2e41a20>
    r;   r)   r<   r4   r   c                    || _         d S r7   r;   r  s     r=   r   zAwait.postinit
  r  r?   c              #     K   | j         V  d S r7   r;   r   s    r=   r   zAwait.get_children
  r  r?   Nr  r  r   r?   r=   r  r  
  sV          " !OMMM       r?   r  c                  |     e Zd ZdZdZ	 	 	 	 ddddd fdZej        ej        	 	 d d!d                        Z	 xZ
S )"
ImportFromzClass representing an :class:`ast.ImportFrom` node.

    >>> import astroid
    >>> node = astroid.extract_node('from my_package import my_module')
    >>> node
    <ImportFrom l.1 at 0x7f23b2e415c0>
    )modnamenameslevelr   Nr  fromnamer+  r  list[tuple[str, str | None]]r  r   r   r   r   r   r   r   r4   r   c                   || _         	 || _        	 || _        	 t                                          |||||           dS )a  
        :param fromname: The module that is being imported from.

        :param names: What is being imported from the module.

        :param level: The level of relative import.

        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   N)r  r  r  r   r   )
r   r  r  r  r   r   r   r   r   r   s
            r=   r   zImportFrom.__init__
  si    > $,	
 49
	 "'
	 	!!) 	 	
 	
 	
 	
 	
r?   TrG   rH   asnamer5   r   r
   rp  c                N   |pt                      }|j        }|t          | |          |r;	 |                     |          }n$# t          $ r}t          | |          |d}~ww xY w	 |                                 }n$# t          $ r}t          | |          |d}~ww xY w	 t          |          }||_        |                    ||| 	                                u           }t          ||          S # t          $ r&}t          t          |          | ||          |d}~ww xY w)z;Infer a ImportFrom node: return the imported module/object.NrJ   )ignore_localsr  	attributerG   )r   r   r    	real_namer   do_import_moduler   r   rE  rootr   r   )	r   rG   r!  r   r   r   moduler   errors	            r=   r   zImportFrom._infer  st    /-//!< dG<<<< 	JJ~~d++* J J J$$@@@cIJ	F**,,FF# 	F 	F 	F dG<<<#E	F	"7++G!%GNN4v7LNMMEw///& 	 	 	 E

44  	sH   A 
A%A  A%)A> >
BBB#AC4 4
D$>!DD$)r   NNN)r  r+  r  r  r  r   r   r   r   r   r   r   r   r   r   r   r4   r   NT)rG   rH   r!  r5   r   r
   r4   rp  r   r   r   r   r  r   r   r   r  r   r   r   s   @r=   r  r  
  s          2M !!% $:
 "&%):
 :
 :
 :
 :
 :
 :
 :
x ) ,0     *)    r?   r  c                       e Zd ZU dZded<   dZdZd fdZddZd Z	e
j        e
j        	 ddd                        Z xZS )	Attributez2Class representing an :class:`ast.Attribute` node.r)   r  r  r  r  r   r   rt   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r  r  s          r=   r   zAttribute.__init__E  sI     !(!!) 	 	
 	
 	
 	
 	
r?   c                    || _         d S r7   r  r  s     r=   r   zAttribute.postinitZ  r   r?   c              #     K   | j         V  d S r7   r  r   s    r=   r   zAttribute.get_children]  r  r?   NrG   rH   r   r
   r  c                    t          | |fi |S r7   r  r  s      r=   r   zAttribute._infer`  r  r?   r  r  r7   rL  )r   r   r   r   rv  r   r  r   r   r   r   r   r  r   r   r   s   @r=   r.  r.  =  s         <<LLLO!M
 
 
 
 
 
*      )159 9 9 9  *)9 9 9 9 9r?   r.  c                  ~     e Zd ZdZdZ	 	 	 ddddd fdZd Zej        ej	        	 ddd                        Z
 xZS )GlobalzClass representing an :class:`ast.Global` node.

    >>> import astroid
    >>> node = astroid.extract_node('global a_global')
    >>> node
    <Global l.1 at 0x7f23b2e9de10>
    r  Nr  r  	list[str]r   r   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           dS )a  
        :param names: The names being declared as global.

        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   Nr  r   r   r   r  r   r   r   r   r   r   s          r=   r   zGlobal.__init__s  sI    2 !&
1!!) 	 	
 	
 	
 	
 	
r?   c                    |S r7   r   r1  s      r=   r2  zGlobal._infer_name      r?   rG   rH   r   r
   rp  c                   ||j         t          | |          	 t          |                                                     |j                   |          S # t
          $ r+}t          t          |          | |j         |          |d }~ww xY w)NrJ   r$  )r   r    r   r(  rE  r   r   )r   rG   r   r*  s       r=   r   zGlobal._infer  s    
 ?g08 dG<<<<			 3 3G4F G GQQQ& 	 	 	 E

473Ew  	s   9A 
B &BBr.  r  r6  r   r   r   r   r   r   r   r   r   r   r4   r   r7   r  )r   r   r   r   r  r   r2  r   r   r  r   r   r   s   @r=   r4  r4  h  s          M
 "!% $"
 "&%)"
 "
 "
 "
 "
 "
 "
 "
H   )15     *)    r?   r4  c                       e Zd ZU dZdZdZded<   	 ded<   	 ded<   	 ddZed             Z	ddZ
d Zd Z fdZ fdZ xZS )r^   zClass representing an :class:`ast.If` node.

    >>> import astroid
    >>> node = astroid.extract_node('if condition: print(True)')
    >>> node
    <If l.1 at 0x7f23b2e9dd30>
    rY   r[   r\   r  r)   rY   r  r[   r\   r4   r   c                0    || _         || _        || _        d S r7   r?  r   rY   r[   r\   s       r=   r   zIf.postinit      		r?   c                    | j         j        S r  rY   r  r   s    r=   r  zIf.blockstart_tolineno  r  r?   r   rt   tuple[int, int]c                    || j         d         j        k    r||fS || j         d         j        k    r|| j         d         j        fS |                     || j        | j         d         j        dz
            S )Get a range from the given line number to where this node ends.

        :param lineno: The line number to start the range at.

        :returns: The range of line numbers that this node belongs to,
            starting at the given line number.
        r   rM  rX   )r[   r4  r  _elsed_block_ranger\   r   r   s     r=   block_rangezIf.block_range  ss     TYq\,,,6>!TYr]+++49R=111&&vt{DIaL<SVW<WXXXr?   c              #  P   K   | j         V  | j        E d {V  | j        E d {V  d S r7   r?  r   s    r=   r   zIf.get_children  K      i9;r?   c                r    t          | j                  dk    ot          | j        d         t                    S )NrX   r   )rC  r\   r8   r^   r   s    r=   has_elif_blockzIf.has_elif_block  s,    4;1$GDKNB)G)GGr?   c              #     K   | j                                         E d{V  t                                                      E d{V  dS z/An If node can contain a Yield node in the testNrY   r  r   r  s    r=   r  z"If._get_yield_nodes_skip_functions  [      9<<>>>>>>>>>77::<<<<<<<<<<<r?   c              #     K   | j                                         E d{V  t                                                      E d{V  dS rP  rY   r  r   r  s    r=   r  z If._get_yield_nodes_skip_lambdas  [      9::<<<<<<<<<7788:::::::::::r?   rY   r)   r[   r  r\   r  r4   r   r   rt   r4   rE  )r   r   r   r   r   r	  rv  r   r   r  rJ  r   rN  r  r  r   r   s   @r=   r^   r^     s           1O1LLL1$-   
 " " _"Y Y Y Y  H H H= = = = =
; ; ; ; ; ; ; ; ;r?   r^   c                  x    e Zd ZU dZdZded<   	 ded<   	 ded<   	 dd	Zd
 ZddZe	j
        	 ddd            ZdS )IfExpzClass representing an :class:`ast.IfExp` node.
    >>> import astroid
    >>> node = astroid.extract_node('value if condition else other')
    >>> node
    <IfExp l.1 at 0x7f23b2e9dbe0>
    r?  r)   rY   r[   r\   r4   r   c                0    || _         || _        || _        d S r7   r?  rA  s       r=   r   zIfExp.postinit  rB  r?   c              #  @   K   | j         V  | j        V  | j        V  d S r7   r?  r   s    r=   r   zIfExp.get_children  s0      iikr?   Literal[False]c                    dS )NFr   r   s    r=   r
  zIfExp.op_left_associative  s	     ur?   NrG   rH   r   r
   rp  c              +    K   d}|pt                      }t          |          }t          |          }	 t          | j                            |                                                    }t          |t          j                  sX|	                                r"| j
                            |          E d{V  n>| j                            |          E d{V  nd}n# t          t          f$ r d}Y nw xY w|rD| j
                            |          E d{V  | j                            |          E d{V  dS dS )zSupport IfExp inference.

        If we can't infer the truthiness of the condition, we default
        to inferring both branches. Otherwise, we infer either branch
        depending on the condition.
        Frr   NT)r   r   rO   rY   rP   r  r8   r   rQ   r   r[   r\   r    rv   )r   rG   r   both_branchesr  r  rY   s          r=   r   zIfExp._infer  s      
 /-//"7++"7++	%	@@AAD dD$899 %??$$ F#y{CCCCCCCCCC#{000EEEEEEEEEE $ . 	! 	! 	! MMM	!  	>y{;;;;;;;;;{(((===========	> 	>s   :C# #C98C9)rY   r)   r[   r)   r\   r)   r4   r   )r4   r\  r7   r  )r   r   r   r   r   rv  r   r   r
  r   r   r   r   r?   r=   rY  rY    s           1OLLL1LLL$NNN-   
  
   
 )15> > > > *)> > >r?   rY  c                  z     e Zd ZdZdZ	 	 	 ddddd fdZej        ej        	 	 ddd                        Z	 xZ
S )ImportzClass representing an :class:`ast.Import` node.
    >>> import astroid
    >>> node = astroid.extract_node('import astroid')
    >>> node
    <Import l.1 at 0x7f23b2e4e5c0>
    r5  Nr  r  r  r   r   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           dS )a  
        :param names: The names being imported.

        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   Nr8  r9  s          r=   r   zImport.__init__=  sM    2 49
	 	!!) 	 	
 	
 	
 	
 	
r?   TrG   rH   r!  r5   r   r
   #Generator[nodes.Module, None, None]c              +  2  K   |pt                      }|j        }|t          | |          	 |r,|                     |                     |                    V  dS |                     |          V  dS # t
          $ r}t          | |          |d}~ww xY w)z8Infer an Import node: return the imported module/object.NrJ   )r   r   r    r'  r&  r   )r   rG   r!  r   r   r   s         r=   r   zImport._infere  s       /-//!< dG<<<<	F 2++DNN4,@,@AAAAAAA++D1111111# 	F 	F 	F dG<<<#E	Fs   ,A5 A5 5
B?BBr.  )r  r  r   r   r   r   r   r   r   r   r   r   r4   r   r+  )rG   rH   r!  r5   r   r
   r4   rc  r,  r   s   @r=   ra  ra  3  s          M
 "!% $&
 "&%)&
 &
 &
 &
 &
 &
 &
 &
P ) ,0F F F F  *)F F F F Fr?   ra  c                  H     e Zd ZU dZdZdZded<   	 d fdZddZd Z	 xZ
S )KeywordzClass representing an :class:`ast.keyword` node.

    >>> import astroid
    >>> node = astroid.extract_node('function(a_kwarg=True)')
    >>> node
    <Call l.1 at 0x7f23b2e9e320>
    >>> node.keywords
    [<Keyword l.1 at 0x7f23b2e9e9b0>]
    r;   r@  r)   r<   rU  r+  r   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   )rU  r   r   )r   rU  r   r   r   r   r   r   s          r=   r   zKeyword.__init__  sI     -!!) 	 	
 	
 	
 	
 	
r?   c                    || _         d S r7   r;   r  s     r=   r   zKeyword.postinit  r  r?   c              #     K   | j         V  d S r7   r;   r   s    r=   r   zKeyword.get_children  r  r?   )rU  r+  r   r   r   r   r   r)   r   r   r   r   r4   r   r  r  r   s   @r=   rf  rf  |  s           !OMMMM;
 
 
 
 
 
*         r?   rf  c                  x     e Zd ZdZdZ	 	 	 	 ddddd fdZej        Z	 ej	        Z
ej        ZddZdddZ xZS )rC   zClass representing an :class:`ast.List` node.

    >>> import astroid
    >>> node = astroid.extract_node('[1, 2, 3]')
    >>> node
    <List.list l.1 at 0x7f23b2e9e128>
    ctxNr  rl  Context | Noner   r   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           dS )a  
        :param ctx: Whether the list is assigned to or loaded from.

        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   Nrl  r   r   r   rl  r   r   r   r   r   r   s          r=   r   zList.__init__  sI    2 $'=!!) 	 	
 	
 	
 	
 	
r?   Literal['builtins.list']c                    dS )r   zbuiltins.listr   r   s    r=   r   zList.pytype  r  r?   rG   rH   c                2    t          | | j        ||          S zGet an item from this node.

        :param index: The node to use as a subscript index.
        :type index: Const or Slice
        rr   r   rL   r   rx   rG   s      r=   r  zList.getitem       "$	5'JJJJr?   r  rl  rm  r   r   r   r   r   r   r   r   r   r   r4   r   )r4   rq  r7   r  )r   r   r   r   r  r   r   sequence_assigned_stmtsr   list_infer_unary_opr  tl_infer_binary_opr  r   r  r   r   s   @r=   rC   rC     s          M #!!% $"
 "&%)"
 "
 "
 "
 "
 "
 "
 "
H 6N 2N2O   K K K K K K K K Kr?   rC   c                  >     e Zd ZdZdZ	 	 	 ddddd fdZd Z xZS )Nonlocala   Class representing an :class:`ast.Nonlocal` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    def function():
        nonlocal var
    ''')
    >>> node
    <FunctionDef.function l.2 at 0x7f23b2e9e208>
    >>> node.body[0]
    <Nonlocal l.3 at 0x7f23b2e9e908>
    r5  Nr  r  r6  r   r   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           dS )a  
        :param names: The names being declared as not local.

        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   Nr8  r9  s          r=   r   zNonlocal.__init__   sI    2 !&
4!!) 	 	
 	
 	
 	
 	
r?   c                    |S r7   r   r1  s      r=   r2  zNonlocal._infer_name$  r;  r?   r.  r=  )r   r   r   r   r  r   r2  r   r   s   @r=   r}  r}    s          M
 "!% $"
 "&%)"
 "
 "
 "
 "
 "
 "
 "
H      r?   r}  c                  V     e Zd ZU dZdZded<   d fdZddZ	 dddZe	j
        Z xZS )	ParamSpeczClass representing a :class:`ast.ParamSpec` node.

    >>> import astroid
    >>> node = astroid.extract_node('type Alias[**P] = Callable[P, int]')
    >>> node.type_params[0]
    <ParamSpec l.1 at 0x7f23b2e4e198>
    r   rE   r   r   rt   r   r   r)   r   r   r4   r   c               T    t                                          |||||           d S r   r  r   s         r=   r   zParamSpec.__init__5  r  r?   c                   || _         d S r7   r   rb  s     r=   r   zParamSpec.postinitF  r   r?   NrG   rH   r   r
   Iterator[ParamSpec]c              +     K   | V  d S r7   r   r  s      r=   r   zParamSpec._inferI  r  r?   r   rt   r   rt   r   r)   r   rt   r   rt   r4   r   r   rE   r4   r   r7   )rG   rH   r   r
   r4   r  r   r   r   r   r   rv  r   r   r   r   generic_type_assigned_stmtsr   r   r   s   @r=   r  r  (              O
 
 
 
 
 
"    26    
 :N   r?   r  c                      e Zd ZdZdS )PasszClass representing an :class:`ast.Pass` node.

    >>> import astroid
    >>> node = astroid.extract_node('pass')
    >>> node
    <Pass l.1 at 0x7f23b2e9e748>
    Nr2  r   r?   r=   r  r  T  r3  r?   r  c                  F    e Zd ZU dZdZded<   	 ded<   	 ddZdd
Zd ZdS )RaisezClass representing an :class:`ast.Raise` node.

    >>> import astroid
    >>> node = astroid.extract_node('raise RuntimeError("Something bad happened!")')
    >>> node
    <Raise l.1 at 0x7f23b2e9e828>
    r   causer   r   r  r4   r   c                "    || _         || _        d S r7   r  )r   r   r  s      r=   r   zRaise.postinito  s    
 


r?   r5   c                t    | j         sdS t          d | j                                         D                       S )zCheck if this node raises a :class:`NotImplementedError`.

        :returns: Whether this node raises a :class:`NotImplementedError`.
        Fc              3  ,   K   | ]}|j         d k    V  dS )NotImplementedErrorNr   )r}   r   s     r=   r   z/Raise.raises_not_implemented.<locals>.<genexpr>~  s;       
 
37DI..
 
 
 
 
 
r?   )r   rb   r  r   s    r=   raises_not_implementedzRaise.raises_not_implementedw  sO    
 x 	5 
 
;?8;S;S;U;U
 
 
 
 
 	
r?   c              #  N   K   | j         	| j         V  | j        | j        V  d S d S r7   r  r   s    r=   r   zRaise.get_children  s=      8(NNN:!* "!r?   N)r   r   r  r   r4   r   ru  )	r   r   r   r   r   rv  r   r  r   r   r?   r=   r  r  ^  s|           'O5   	
 	
 	
 	
    r?   r  c                  >    e Zd ZU dZdZded<   	 ddZd Zd	 Zd
 Z	dS )ReturnzClass representing an :class:`ast.Return` node.

    >>> import astroid
    >>> node = astroid.extract_node('return True')
    >>> node
    <Return l.1 at 0x7f23b8211908>
    r;   r   r<   r4   r   c                    || _         d S r7   r;   r  s     r=   r   zReturn.postinit  r  r?   c              #  .   K   | j         | j         V  d S d S r7   r;   r   s    r=   r   zReturn.get_children  *      :!* "!r?   c                6    t          | j        t                    S r7   )r8   r<   rD   r   s    r=   is_tuple_returnzReturn.is_tuple_return  s    $*e,,,r?   c              #     K   | V  d S r7   r   r   s    r=    _get_return_nodes_skip_functionsz'Return._get_return_nodes_skip_functions        




r?   Nr<   r   r4   r   )
r   r   r   r   r   rv  r   r   r  r  r   r?   r=   r  r    sw           !O#     - - -    r?   r  c                  (    e Zd ZdZej        ZddZdS )SetzClass representing an :class:`ast.Set` node.

    >>> import astroid
    >>> node = astroid.extract_node('{1, 2, 3}')
    >>> node
    <Set.set l.1 at 0x7f23b2e71d68>
    r4   Literal['builtins.set']c                    dS )r   zbuiltins.setr   r   s    r=   r   z
Set.pytype  s	    
 ~r?   N)r4   r  )r   r   r   r   r   set_infer_unary_opr  r   r   r?   r=   r  r    s<          1N     r?   r  c                      e Zd ZU dZdZded<   	 ded<   	 ded<   	 dd	Zd
 Zedd            Z	d dZ
d!dZ	 d"d#dZd"d$dZd Z	 d"d%dZdS )&r   zClass representing an :class:`ast.Slice` node.

    >>> import astroid
    >>> node = astroid.extract_node('things[1:3]')
    >>> node
    <Subscript l.1 at 0x7f23b2e71f60>
    >>> node.slice
    <Slice l.1 at 0x7f23b2e71e80>
    r   r   r   r   r   r   r   r4   r   c                0    || _         || _        || _        d S r7   r  )r   r   r   r   s       r=   r   zSlice.postinit  s     

			r?   c                :    |st          |          }| |_        |S |S )z7Wrap the empty attributes of the Slice in a Const node.)r   r   )r   attrconsts      r=   _wrap_attributezSlice._wrap_attribute  s(     	!$''EELLr?   nodes.ClassDefc                ^    t                      j        }|                    d          d         S )Nr   r   )r&   builtins_modulerE  )r   builtinss     r=   r  zSlice._proxied  s)    !##3((++r?   Literal['builtins.slice']c                    dS )r   zbuiltins.slicer   r   s    r=   r   zSlice.pytype  
    
  r?   Literal['Slice']c                    dS )zVA human readable type of this node.

        :returns: The type of this node.
        r   r   r   s    r=   display_typezSlice.display_type  s	    
 wr?   Nr  r   rG   rH   #Iterator[SuccessfulInferenceResult]c              #    K   |dk    r|                      | j                  V  dS |dk    r|                      | j                  V  dS |dk    r|                      | j                  V  dS |                     ||          E d{V  dS )zInfer the possible values of the given attribute on the slice.

        :param attrname: The name of the attribute to infer.

        :returns: The inferred possible values.
        startstopr   rr   N)r  r   r   r   rE  r   r  rG   s      r=   r  zSlice.igetattr  s       w&&tz2222222&&tz2222222&&ty1111111||Hg|>>>>>>>>>>>r?   c                8    | j                             ||          S r7   )r  rE  r  s      r=   rE  zSlice.getattr  s    }$$Xw777r?   c              #  n   K   | j         	| j         V  | j        	| j        V  | j        | j        V  d S d S r7   r  r   s    r=   r   zSlice.get_children	  sQ      :!*:!*9 )OOOOO ! r?   r   r
   Iterator[Slice]c              +     K   | V  d S r7   r   r  s      r=   r   zSlice._infer  r  r?   )r   r   r   r   r   r   r4   r   )r4   r  )r4   r  )r4   r  r7   )r  r   rG   rH   r4   r  r  )rG   rH   r   r
   r4   r  )r   r   r   r   r   rv  r   r  r   r  r   r  r  rE  r   r   r   r?   r=   r   r     s%          1O''+      , , , _,           AE? ? ? ? ?$8 8 8 8 8   26      r?   r   c                  X     e Zd ZU dZdZdZded<   	 d fdZddZe	j
        Z	 d Z xZS )r   zClass representing an :class:`ast.Starred` node.

    >>> import astroid
    >>> node = astroid.extract_node('*args')
    >>> node
    <Starred l.1 at 0x7f23b2e41978>
    r;   rk  r)   r<   rl  r   r   rt   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   ro  rp  s          r=   r   zStarred.__init__(  sI     E!!) 	 	
 	
 	
 	
 	
r?   c                    || _         d S r7   r;   r  s     r=   r   zStarred.postinit=  r  r?   c              #     K   | j         V  d S r7   r;   r   s    r=   r   zStarred.get_childrenE  r  r?   rl  r   r   rt   r   rt   r   r)   r   r   r   r   r4   r   r  )r   r   r   r   r   r  rv  r   r   r   starred_assigned_stmtsr   r   r   r   s   @r=   r   r     s           !OMMMM!
 
 
 
 
 
*    5N      r?   r   c                       e Zd ZU dZ e            ZdZdZded<   	 ded<   	 d fdZ	ddZ
d Z	 d d!dZej        ej        d d"d                        Zej        d d"d            Z xZS )#	SubscriptzClass representing an :class:`ast.Subscript` node.

    >>> import astroid
    >>> node = astroid.extract_node('things[1:3]')
    >>> node
    <Subscript l.1 at 0x7f23b2e71f60>
    r<   r   rk  r)   r<   r   rl  r   r   rt   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   ro  rp  s          r=   r   zSubscript.__init__\  sI     I!!) 	 	
 	
 	
 	
 	
r?   c                "    || _         || _        d S r7   r  )r   r<   r   s      r=   r   zSubscript.postinitr  s    



r?   c              #  .   K   | j         V  | j        V  d S r7   r  r   s    r=   r   zSubscript.get_childrenv  s(      jjr?   NrG   rH   r   r
   r   c           	   +  n  K   ddl m} d}| j                            |          D ]{}t	          |t
          j                  rt
          j        V   dS | j                            |          D ]1}t	          |t
          j                  rt
          j        V    dS | j	        }|j
        t          k    r|}n,|j
        t          k    r|                    |          }|r|}n|}|| j	        u rt          | |          	 |                    ||          }	n=# t          t           t"          t$          t&          f$ r}
t          | |          |
d}
~
ww xY w| |	u st	          |	t
          j                  rt
          j        V    dS |	                    |          E d{V  d}3}|rt)          | |          S dS )zInference for subscripts.

        We're understanding if the index is a Const
        or a slice, passing the result of inference
        to the value's `getitem` method, which should
        handle each supported index type accordingly.
        r   )helpersFNrJ   T)astroidr  r<   rP   r8   r   rQ   rM   r   _SUBSCRIPT_SENTINELr   r   class_instance_as_indexr    r  r   r   r   r   r  r+   )r   rG   r   r  	found_oner<   rx   r  instance_as_indexassignedr   s              r=   _infer_subscriptzSubscript._infer_subscriptz  s      	$#####	Z%%g.. (	! (	!E%!566 &&&&tt))'22 $! $!eT%9::  ****444 #6?h.."'KK_00(/(G(G(N(N%( 8&7"'K$":::(dGDDDD	N$}}['BBHH$%%+" N N N )dGDDD#MN 8##z(D<P'Q'Q#****444#>>'222222222 		I$!L  	B%4AAAAts   =D#E7E		Ec                     | j         |fi |S r7   r  r  s      r=   r   zSubscript._infer  s     %t$W77777r?   c                     | j         |fi |S r7   r  r  s      r=   r  zSubscript.infer_lhs  s    $t$W77777r?   r  )r<   r)   r   r)   r4   r   r7   r  )rG   rH   r   r
   )r   r   r   r   r  r  r   r  rv  r   r   r   r  r   r   r  r   r  r   r   s   @r=   r  r  I  s          !&(((OMMMM MMM)
 
 
 
 
 
,     
 269 9 9 9 9v )8 8 8 8  *)8 )8 8 8 8 *)8 8 8 8 8r?   r  c                  H     e Zd ZdZdZdZd fdZddZd ZddZ	d Z
 xZS )r`   a@  Class representing a :class:`ast.Try` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
        try:
            do_something()
        except Exception as error:
            print("Error!")
        finally:
            print("Cleanup!")
        ''')
    >>> node
    <Try l.2 at 0x7f23b2e41d68>
    r[   rZ   r\   	finalbodyr   rt   r   r   r   r   r)   r4   r   c                   g | _         	 g | _        	 g | _        	 g | _        	 t	                                          |||||           dS   
        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   Nr[   rZ   r\   r  r   r   r   r   r   r   r   r   r   s         r=   r   zTry.__init__  sg    , #%	A-/%$&1')4!!) 	 	
 	
 	
 	
 	
r?   r[   r  rZ   list[ExceptHandler]r\   r  c               >    || _         || _        || _        || _        dS )a&  Do some setup after initialisation.

        :param body: The contents of the block to catch exceptions from.

        :param handlers: The exception handlers.

        :param orelse: The contents of the ``else`` block.

        :param finalbody: The contents of the ``finally`` block.
        Nr  r   r[   rZ   r\   r  s        r=   r   zTry.postinit  s$    $ 	 "r?   c                    |S r7   r   r1  s      r=   r2  zTry._infer_name  r;  r?   rE  c                B   || j         k    r||fS | j        rD| j        d         j         |cxk    r| j        d         j        k    rn n|| j        d         j        fS | j        D ]e}|j        r||j        j         k    r||fc S |j        d         j         |cxk    r|j        d         j        k    rn O||j        d         j        fc S f| j        ra| j        d         j         dz
  |k    r||fS | j        d         j         |cxk    r| j        d         j        k    rn n|| j        d         j        fS | j        ra| j        d         j         dz
  |k    r||fS | j        d         j         |cxk    r| j        d         j        k    rn n|| j        d         j        fS || j        fS z=Get a range from a given line number to where this node ends.r   rM  rX   r4  r[   r  rZ   ru   r\   r  r   r   	exhandlers      r=   rJ  zTry.block_range     T_$$6>!9 	210FTTTTdim>TTTTTT49R=111 	; 	;I~ &&IN,E"E"Ev~%%%~a +vTTTT9K9TTTTTTy~b1::::: U; 	8{1~(1,66v~%{1~(FNNNNdk"o6NNNNNNt{2777> 	;~a +a/699v~%~a +vTTTT9K9TTTTTTt~b1:::t}$$r?   c              #  r   K   | j         E d {V  | j        E d {V  | j        E d {V  | j        E d {V  d S r7   r  r   s    r=   r   zTry.get_children.  t      9=       ;>!!!!!!!!!r?   )r   rt   r   rt   r   rt   r   rt   r   r)   r4   r   )
r[   r  rZ   r  r\   r  r  r  r4   r   rW  r   r   r   r   r   r	  r   r   r2  rJ  r   r   r   s   @r=   r`   r`     s          BOJ(
 (
 (
 (
 (
 (
T# # # #.  % % % %0" " " " " " "r?   r`   c                  b     e Zd ZdZdZdZddddddd fdZdddddddZd ZddZ	d Z
 xZS )TryStarz0Class representing an :class:`ast.TryStar` node.r  Nr   r   r   r   r   r   r   r   r4   r   c                   g | _         	 g | _        	 g | _        	 g | _        	 t	                                          |||||           dS )a  
        :param lineno: The line that this node appears on in the source code.
        :param col_offset: The column that this node appears on in the
            source code.
        :param parent: The parent node in the syntax tree.
        :param end_lineno: The last line this node appears on in the source code.
        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   Nr  r  s         r=   r   zTryStar.__init__;  sg    $ #%	A-/%$&1')4!!) 	 	
 	
 	
 	
 	
r?   r[   r$  rZ   list[ExceptHandler] | Noner\   r  c               R    |r|| _         |r|| _        |r|| _        |r	|| _        dS dS )a"  Do some setup after initialisation.
        :param body: The contents of the block to catch exceptions from.
        :param handlers: The exception handlers.
        :param orelse: The contents of the ``else`` block.
        :param finalbody: The contents of the ``finally`` block.
        Nr  r  s        r=   r   zTryStar.postinita  sN      	DI 	%$DM 	! DK 	'&DNNN	' 	'r?   c                    |S r7   r   r1  s      r=   r2  zTryStar._infer_namex  r;  r?   rt   rE  c                B   || j         k    r||fS | j        rD| j        d         j         |cxk    r| j        d         j        k    rn n|| j        d         j        fS | j        D ]e}|j        r||j        j         k    r||fc S |j        d         j         |cxk    r|j        d         j        k    rn O||j        d         j        fc S f| j        ra| j        d         j         dz
  |k    r||fS | j        d         j         |cxk    r| j        d         j        k    rn n|| j        d         j        fS | j        ra| j        d         j         dz
  |k    r||fS | j        d         j         |cxk    r| j        d         j        k    rn n|| j        d         j        fS || j        fS r  r  r  s      r=   rJ  zTryStar.block_range{  r  r?   c              #  r   K   | j         E d {V  | j        E d {V  | j        E d {V  | j        E d {V  d S r7   r  r   s    r=   r   zTryStar.get_children  r  r?   )r   r   r   r   r   r   r   r   r   r   r4   r   )
r[   r$  rZ   r  r\   r$  r  r$  r4   r   rW  r  r   s   @r=   r  r  5  s        ::AOJ
 "!%!%%) $$
 $
 $
 $
 $
 $
 $
 $
R %)/3&*)-' ' ' ' ' '.  % % % %0" " " " " " "r?   r  c                  x     e Zd ZdZdZ	 	 	 	 ddddd fdZej        Z	 ej	        Z
ej        ZddZdddZ xZS )rD   zClass representing an :class:`ast.Tuple` node.

    >>> import astroid
    >>> node = astroid.extract_node('(1, 2, 3)')
    >>> node
    <Tuple.tuple l.1 at 0x7f23b2e41780>
    rk  Nr  rl  rm  r   r   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           dS )a  
        :param ctx: Whether the tuple is assigned to or loaded from.

        :param lineno: The line that this node appears on in the source code.

        :param col_offset: The column that this node appears on in the
            source code.

        :param parent: The parent node in the syntax tree.

        :param end_lineno: The last line this node appears on in the source code.

        :param end_col_offset: The end column this node appears on in the
            source code. Note: This is after the last symbol.
        r   Nro  rp  s          r=   r   zTuple.__init__  sI    2 $'>!!) 	 	
 	
 	
 	
 	
r?   Literal['builtins.tuple']c                    dS )r   zbuiltins.tupler   r   s    r=   r   zTuple.pytype  r  r?   rG   rH   c                2    t          | | j        ||          S rt  ru  rv  s      r=   r  zTuple.getitem  rw  r?   r  rx  )r4   r  r7   r  )r   r   r   r   r  r   r   ry  r   tuple_infer_unary_opr  r{  r  r   r  r   r   s   @r=   rD   rD     s          M #!!% $"
 "&%)"
 "
 "
 "
 "
 "
 "
 "
H 6N 3N2O       K K K K K K K K Kr?   rD   c                  t     e Zd ZU dZdZded<   ded<   ded<   d fdZddZ	 dddZe	j
        Zded<    xZS ) 	TypeAliaszClass representing a :class:`ast.TypeAlias` node.

    >>> import astroid
    >>> node = astroid.extract_node('type Point = tuple[float, float]')
    >>> node
    <TypeAlias l.1 at 0x7f23b2e4e198>
    r   type_paramsr<   rE   r   (list[TypeVar | ParamSpec | TypeVarTuple]r  r)   r<   r   rt   r   r   r   r   r4   r   c               T    t                                          |||||           d S r   r  r   s         r=   r   zTypeAlias.__init__  r  r?   c               0    || _         || _        || _        d S r7   r  )r   r   r  r<   s       r=   r   zTypeAlias.postinit  s     	&


r?   NrG   rH   r   r
   Iterator[TypeAlias]c              +     K   | V  d S r7   r   r  s      r=   r   zTypeAlias._infer  r  r?   ziClassVar[Callable[[TypeAlias, AssignName, InferenceContext | None, None], Generator[NodeNG, None, None]]]r   r  )r   rE   r  r   r<   r)   r4   r   r7   )rG   rH   r   r
   r4   r  )r   r   r   r   r   rv  r   r   r   r   r  r   r   r   s   @r=   r  r    s           7O9999MMM
 
 
 
 
 
"	 	 	 	 26     	'  
( 
( 
( 
( 
( 
( 
( 
(r?   r  c                  `     e Zd ZU dZdZded<   ded<   d fdZddZ	 dddZe	j
        Z xZS )TypeVarzClass representing a :class:`ast.TypeVar` node.

    >>> import astroid
    >>> node = astroid.extract_node('type Point[T] = tuple[float, float]')
    >>> node.type_params[0]
    <TypeVar l.1 at 0x7f23b2e4e198>
    r   rA   rE   r   r   rA   r   rt   r   r   r)   r   r   r4   r   c               T    t                                          |||||           d S r   r  r   s         r=   r   zTypeVar.__init__,  r  r?   c               "    || _         || _        d S r7   r  )r   r   rA   s      r=   r   zTypeVar.postinit=  r   r?   NrG   rH   r   r
   Iterator[TypeVar]c              +     K   | V  d S r7   r   r  s      r=   r   zTypeVar._inferA  r  r?   r  )r   rE   rA   r   r4   r   r7   )rG   rH   r   r
   r4   r
  r  r   s   @r=   r  r    s           (O
 
 
 
 
 
"   
 26    
 :N   r?   r  c                  V     e Zd ZU dZdZded<   d fdZddZ	 dddZe	j
        Z xZS )TypeVarTuplezClass representing a :class:`ast.TypeVarTuple` node.

    >>> import astroid
    >>> node = astroid.extract_node('type Alias[*Ts] = tuple[*Ts]')
    >>> node.type_params[0]
    <TypeVarTuple l.1 at 0x7f23b2e4e198>
    r   rE   r   r   rt   r   r   r)   r   r   r4   r   c               T    t                                          |||||           d S r   r  r   s         r=   r   zTypeVarTuple.__init__Y  r  r?   c                   || _         d S r7   r   rb  s     r=   r   zTypeVarTuple.postinitj  r   r?   NrG   rH   r   r
   Iterator[TypeVarTuple]c              +     K   | V  d S r7   r   r  s      r=   r   zTypeVarTuple._inferm  r  r?   r  r  r7   )rG   rH   r   r
   r4   r  r  r   s   @r=   r  r  L  r  r?   r  __pos____neg__
__invert__)+-~notc                       e Zd ZU dZdZdZded<   	 d! fdZd"dZd#d$dZ	d Z
 fdZ	 d#d%dZej        ej        	 d#d&d                         Z xZS )'UnaryOpzClass representing an :class:`ast.UnaryOp` node.

    >>> import astroid
    >>> node = astroid.extract_node('-5')
    >>> node
    <UnaryOp l.1 at 0x7f23b2e4e198>
    operandr  r)   r  r  r   r   rt   r   r   r   r   r   r4   r   c               d    || _         	 t                                          |||||           d S r   r  r  s          r=   r   zUnaryOp.__init__  r  r?   c                    || _         d S r7   r  )r   r  s     r=   r   zUnaryOp.postinit  r  r?   NrG   rH   c                l    	 |                      |          }d |D             S # t          $ r g cY S w xY w)a#  Get a list of type errors which can occur during inference.

        Each TypeError is represented by a :class:`BadUnaryOperationMessage`,
        which holds the original exception.

        :returns: The list of possible type errors.
        :rtype: list(BadUnaryOperationMessage)
        rr   c                F    g | ]}t          |t          j                  |S r   )r8   r   BadUnaryOperationMessager  s     r=   r   z'UnaryOp.type_errors.<locals>.<listcomp>  s;       fd&CDD  r?   )_infer_unaryopr    r  s      r=   r  zUnaryOp.type_errors  sd    	))')::G %   
  	 	 	III	r  c              #     K   | j         V  d S r7   r  r   s    r=   r   zUnaryOp.get_children  s      lr?   c                ~    | j         dk    rt          | j                  S t                                                      S )Nr  )r  r(   r   r  r  s    r=   r  zUnaryOp.op_precedence  s3    7e ))ww$$&&&r?   r   nodes.UnaryOpr   r
   TGenerator[InferenceResult | util.BadUnaryOperationMessage, None, InferenceErrorInfo]c              +    K   ddl m} | j                            |          D ]\}	 |                    | j                  V  !# t          $ r'}t          j        || j        |          V  Y d}~Md}~wt          $ r }t          | j                 }|R|                                }t          |t          j                  st          |           V  nt          j        V  nt          |t           |f          s"t          j        || j        |          V  Y d}~	 	 t#          j        ||          }n2# t&          $ r% t          j        || j        |          V  Y Y d}~@w xY w|d         }t)          |                    |          d          }	t          |	t          j                  s|	                                sY d}~t-          |          }||_        t1          g |	          |_        |	                    | |          }
t)          |
d          }||V  n|V  nM# t&          $ r'}t          j        || j        |          V  Y d}~n!d}~wt6          $ r t          j        V  Y nw xY wY d}~Vd}~ww xY wdS )3Infer what an UnaryOp should return when evaluated.r   r  Nrr   )r  rE  )r  r  r  rP   r  r  r   r   r!  r  UNARY_OP_METHODr   r8   rQ   r   rM   r   r%   r   r   rO   callabler   r  r   rI  rD  r    )r   rG   r   r  r  r   methr   methodsrT   call_resultsrG  	inner_excs                r=   r"  zUnaryOp._infer_unaryop  s      	+*****|))'22 6	/ 6	/G5/,,TW555555 K K K3GTWcJJJJJJJJJJ! 0/ 0/ 0/&tw/< ")!3!3!5!5J%j$2FGG /+
N;;;;;;".....%g(/CDD ! #;GTWcRRRRR /%&3&:7D&I&IGG6 % % %"&"?RU"V"VVVV$HHHHH%  'qz#'

7
(C(CT#J#J&x1EFF%#+#4#4#6#6% %HHHH".w"7"7,3).9r(.S.S.S+'/'A'A$PW'A'X'X!%lD!9!9!>")MMMM"(LLL2 Y Y Y";GTWiXXXXXXXXXX) / / /"....../_0/6	/ 6	/s   A
I>A00I>>BI9D54H&5'E$H&#E$$AH&AH&%I9&
I00II9I0-I9/I00I99I>r  c              +     K   |                      | j        |t          j                  E d{V  t	          | |          S )r(  NrJ   )r  r"  r   r!  r+   r  s      r=   r   zUnaryOp._infer  s`       00$*G
 
 	
 	
 	
 	
 	
 	
 	
 "tW====r?   r  )r  r)   r4   r   r7   r  )r   r%  rG   rH   r   r
   r4   r&  )r   r%  rG   rH   r   r
   r4   r  )r   r   r   r   r   r  rv  r   r   r  r   r  r"  r   r   r  r   r   r   s   @r=   r  r    s          #OMOOO0
 
 
 
 
 
*       &  ' ' ' ' ' AE>/ >/ >/ >/ >/@ )@D> > > >  *)> > > > >r?   r  c                       e Zd ZU dZdZdZded<   	 ded<   	 ded<   	 ddZed             Z	ddZ
d Z fdZ fdZ xZS )WhilezClass representing an :class:`ast.While` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    while condition():
        print("True")
    ''')
    >>> node
    <While l.2 at 0x7f23b2e4e390>
    r?  r  r)   rY   r  r[   r\   r4   r   c                0    || _         || _        || _        d S r7   r?  rA  s       r=   r   zWhile.postinit'  s     		r?   c                    | j         j        S r  rD  r   s    r=   r  zWhile.blockstart_tolineno1  r  r?   r   rt   rE  c                8    |                      || j                  S )rG  )rH  r\   rI  s     r=   rJ  zWhile.block_range9  s     &&vt{;;;r?   c              #  P   K   | j         V  | j        E d {V  | j        E d {V  d S r7   r?  r   s    r=   r   zWhile.get_childrenC  rL  r?   c              #     K   | j                                         E d{V  t                                                      E d{V  dS z1A While node can contain a Yield node in the testNrQ  r  s    r=   r  z%While._get_yield_nodes_skip_functionsI  rR  r?   c              #     K   | j                                         E d{V  t                                                      E d{V  dS r7  rT  r  s    r=   r  z#While._get_yield_nodes_skip_lambdasN  rU  r?   rV  rW  )r   r   r   r   r   r	  rv  r   r   r  rJ  r   r  r  r   r   s   @r=   r1  r1    s         	 	 1O1LLL,#-    " " _"< < < <  = = = = =
; ; ; ; ; ; ; ; ;r?   r1  c                  |     e Zd ZdZdZdZdZ	 	 	 ddddd fdZ	 	 	 dddZe	j
        Z	 ed             Zd Z xZS )WithzClass representing an :class:`ast.With` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    with open(file_path) as file_:
        print(file_.read())
    ''')
    >>> node
    <With l.2 at 0x7f23b2e4e710>
    r  r[   r  r  Nr  r   r   r   r   r   r   r   r4   r   c                   g | _         	 g | _        	 d| _        	 t                                          |||||           dS r  Nr   )r  r[   r  r   r   r   s         r=   r   zWith.__init__h  s^    , :<
O"$	1.2X!!) 	 	
 	
 	
 	
 	
r?   r  )list[tuple[NodeNG, NodeNG | None]] | Noner[   r$  r  c                8    ||| _         ||| _        || _        dS )zDo some setup after initialisation.

        :param items: The pairs of context managers and the names
            they are assigned to.

        :param body: The contents of the ``with`` block.
        N)r  r[   r  )r   r  r[   r  s       r=   r   zWith.postinit  s,     DJDI.r?   c                2    | j         d         d         j        S )r  rM  r   )r  r  r   s    r=   r  zWith.blockstart_tolineno  s     z"~a ))r?   c              #  R   K   | j         D ]\  }}|V  |r|V  | j        E d{V  dS )zoGet the child nodes below this node.

        :returns: The children.
        :rtype: iterable(NodeNG)
        Nr;  )r   r  vars      r=   r   zWith.get_children  sX        	 	ID#JJJ 			9r?   r.  r   )r  r>  r[   r$  r  r   r4   r   )r   r   r   r   r   r  r	  r   r   r   with_assigned_stmtsr   r   r  r   r   r   s   @r=   r:  r:  T  s        
	 	 (O.( "!% $	%
 "&%)%
 %
 %
 %
 %
 %
 %
 %
R <@$()-	/ / / / /& 2N * * _*
 
 
 
 
 
 
r?   r:  c                      e Zd ZdZdS )	AsyncWithz7Asynchronous ``with`` built with the ``async`` keyword.Nr2  r   r?   r=   rE  rE    s        AAAAr?   rE  c                  >    e Zd ZU dZdZded<   	 ddZd Zd	 Zd
 Z	dS )YieldzClass representing an :class:`ast.Yield` node.

    >>> import astroid
    >>> node = astroid.extract_node('yield True')
    >>> node
    <Yield l.1 at 0x7f23b2e4e5f8>
    r;   r   r<   r4   r   c                    || _         d S r7   r;   r  s     r=   r   zYield.postinit  r  r?   c              #  .   K   | j         | j         V  d S d S r7   r;   r   s    r=   r   zYield.get_children  r  r?   c              #     K   | V  d S r7   r   r   s    r=   r  z%Yield._get_yield_nodes_skip_functions  r  r?   c              #     K   | V  d S r7   r   r   s    r=   r  z#Yield._get_yield_nodes_skip_lambdas  r  r?   Nr  r  r   r?   r=   rG  rG    sw           !O           r?   rG  c                      e Zd ZdZdS )	YieldFromz2Class representing an :class:`ast.YieldFrom` node.Nr2  r   r?   r=   rM  rM    s        <<<<r?   rM  c                      e Zd ZdZdS )r  z>Represents the unpacking of dicts into dicts using :pep:`448`.Nr2  r   r?   r=   r  r    s        HHHHr?   r  c                  P     e Zd ZdZdZdZ	 	 	 ddddd fdZddddZd Z xZ	S )FormattedValueaP  Class representing an :class:`ast.FormattedValue` node.

    Represents a :pep:`498` format string.

    >>> import astroid
    >>> node = astroid.extract_node('f"Format {type_}"')
    >>> node
    <JoinedStr l.1 at 0x7f23b2e4ed30>
    >>> node.values
    [<Const.str l.1 at 0x7f23b2e4eda0>, <FormattedValue l.1 at 0x7f23b2e4edd8>]
    r<   format_spec)
conversionNr  r   r   r   r   r   r   r   r4   r   c               p    |  	 |  	 d| _         	 t                                          |||||           dS r=  )rR  r   r   r   s         r=   r   zFormattedValue.__init__  sd    , 	8	 .2	 	!!) 	 	
 	
 	
 	
 	
r?   )rR  r<   r)   rS  rt   rR  JoinedStr | Nonec               0    || _         || _        || _        dS )a2  Do some setup after initialisation.

        :param value: The value to be formatted into the string.

        :param conversion: The type of formatting to be applied to the value.

        :param format_spec: The formatting to be applied to the value.
        :type format_spec: JoinedStr or None
        N)r<   rS  rR  )r   r<   rS  rR  s       r=   r   zFormattedValue.postinit#  s       
$&r?   c              #  @   K   | j         V  | j        | j        V  d S d S r7   rQ  r   s    r=   r   zFormattedValue.get_children7  s:      j'"""""" ('r?   r.  r   )r<   r)   rS  rt   rR  rU  r4   r   )
r   r   r   r   r   r  r   r   r   r   r   s   @r=   rP  rP    s        
 
 /O#M "!% $	-
 "&%)-
 -
 -
 -
 -
 -
 -
 -
h )-' ' ' ' ' '(# # # # # # #r?   rP  c                  H     e Zd ZdZdZ	 	 	 ddddd fdZdddZd Z xZS )	JoinedStrzRepresents a list of string expressions to be joined.

    >>> import astroid
    >>> node = astroid.extract_node('f"Format {type_}"')
    >>> node
    <JoinedStr l.1 at 0x7f23b2e4ed30>
    r  Nr  r   r   r   r   r   r   r   r4   r   c               d    g | _         	 t                                          |||||           dS r  )r   r   r   r   s         r=   r   zJoinedStr.__init__I  sM    , %'	
 	!!) 	 	
 	
 	
 	
 	
r?   r   r$  c                    |	|| _         dS dS )zDo some setup after initialisation.

        :param value: The string expressions to be joined.

        :type: list(FormattedValue or Const)
        Nr  r  s     r=   r   zJoinedStr.postinitm  s      DKKK r?   c              #  $   K   | j         E d {V  d S r7   r  r   s    r=   r   zJoinedStr.get_childrenw  r  r?   r.  r   r7   r/  r  r   s   @r=   rY  rY  >  s          "O "!% $	"
 "&%)"
 "
 "
 "
 "
 "
 "
 "
H! ! ! ! !      r?   rY  c                  t     e Zd ZdZdZdZ	 	 	 	 ddddd  fdZd!dZej	        Z
	 ddd"dZd#dZd$dZ xZS )%r   zRepresents the assignment from the assignment expression

    >>> import astroid
    >>> module = astroid.parse('if a := 1: pass')
    >>> module.body[0].test
    <NamedExpr l.1 at 0x7f23b2e4ed30>
    r  TNr  r   r   r   r   r   r   r   r4   r   c               `    |  	 |  	 t                                          |||||           dS r  r  r   s         r=   r   zNamedExpr.__init__  sU    , 		
 	<!!) 	 	
 	
 	
 	
 	
r?   r  r)   r<   c                "    || _         || _        d S r7   r  r  s      r=   r   zNamedExpr.postinit  r  r?   )futurer`  Literal[None, True]@nodes.FunctionDef | nodes.Module | nodes.ClassDef | nodes.Lambdac                  |t          j        dt          d           | j        st	          |           t          | j        t          t          t          f          ro| j        j        st	          | j                  | j        j        j        st	          | j        j                  | j        j        j        	                                S | j        	                                S )zThe first parent frame node.

        A frame node is a :class:`Module`, :class:`FunctionDef`,
        or :class:`ClassDef`.

        :returns: The first parent frame node.
        Nz.The future arg will be removed in astroid 4.0.re  rf  r  )
ri  rj  rk  r   r#   r8   r  rf  rv  r   )r   r`  s     r=   r   zNamedExpr.frame  s     M@"   
 { 	2$D1111 dkIw#FGG 	5;% =(<<<<;%, D(0BCCCC;%,22444{  """r?   r3   c                   | j         st          |           t          | j         t          t          t
          f          ro| j         j         st          | j                   | j         j         j         st          | j         j                   | j         j         j                                         S | j                                         S r  )r   r#   r8   r  rf  rv  r   r   s    r=   r   zNamedExpr.scope  s     { 	2$D1111 dkIw#FGG 	5;% =(<<<<;%, D(0BCCCC;%,22444{  """r?   r   r   rR   c                V    |                                                      ||           dS )a{  Define that the given name is declared in the given statement node.
        NamedExpr's in Arguments, Keyword or Comprehension are evaluated in their
        parent's parent scope. So we add to their frame's locals.

        .. seealso:: :meth:`scope`

        :param name: The name that is being defined.

        :param stmt: The statement that defines the given name.
        N)r   	set_local)r   r   rR   s      r=   rf  zNamedExpr.set_local  s(     	

tT*****r?   r.  r   )r  r)   r<   r)   r4   r   )r`  ra  r4   rb  r  )r   r   rR   r)   r4   r   )r   r   r   r   r   r  r   r   r   named_expr_assigned_stmtsr   r   r   rf  r   r   s   @r=   r   r   {  s          *OOH "!% $	%
 "&%)%
 %
 %
 %
 %
 %
 %
 %
N    8N
 04# # # # # #:# # # #&+ + + + + + + +r?   r   c                  J     e Zd ZdZd Z	 	 	 ddddd fdZddZdddZ xZS )UnknownzThis node represents a node in a constructed AST where
    introspection is not possible.  At the moment, it's only used in
    the args attribute of FunctionDef nodes where function signature
    introspection failed.
    Nr  r   r   r   r   r   r   r4   c               T    t                                          |||||           d S r   r  r   s         r=   r   zUnknown.__init__  r  r?   Literal['Unknown']c                    dS )Nri  r   r   s    r=   r  zUnknown.qname  s    yr?   rG   rH   c              +  &   K   t           j        V  dS )z4Inference on an Unknown node immediately terminates.N)r   rM   r  s      r=   r   zUnknown._infer  s      r?   r.  r  )r4   rk  r7   r  )	r   r   r   r   r   r   r  r   r   r   s   @r=   ri  ri    s          D 	
  #
 
 
 
 
 
 
 
"           r?   ri  c                  <     e Zd ZdZd ZdZdZd fd
Z	 dddZ xZ	S )EvaluatedObjectzContains an object that has already been inferred

    This class is useful to pre-evaluate a particular node,
    with the resulting class acting as the non-evaluated node.
    )originalr;   rp  r-   r<   r,   r4   r   c                    || _         	 || _        	 t                                          | j         j        | j         j        | j         j        | j         j        | j         j                   d S )Nr   )	rp  r<   r   r   r   r   r   r   r   )r   rp  r<   r   s      r=   r   zEvaluatedObject.__init__&  sl     4<?&+
 ='}/='}/=7 	 	
 	
 	
 	
 	
r?   NrG   rH   r   r
   4Generator[NodeNG | util.UninferableBase, None, None]c              +     K   | j         V  d S r7   r;   r  s      r=   r   zEvaluatedObject._infer7  s       jr?   )rp  r-   r<   r,   r4   r   r7   )rG   rH   r   r
   r4   rr  )
r   r   r   r   r   r   r  r   r   r   r   s   @r=   ro  ro    sv          D#OM
 
 
 
 
 
$ 26        r?   ro  c                  D     e Zd ZdZdZdZ	 	 	 ddddd fdZddZ xZS )MatchzClass representing a :class:`ast.Match` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case 200:
            ...
        case _:
            ...
    ''')
    >>> node
    <Match l.2 at 0x10c24e170>
    subjectcases)rx  Nr  r   r   r   r   r   r   r   r4   r   c               \    |  |  t                                          |||||           d S r   r  r   s         r=   r   zMatch.__init__R  sK     	#!!) 	 	
 	
 	
 	
 	
r?   rw  r)   rx  list[MatchCase]c               "    || _         || _        d S r7   rv  )r   rw  rx  s      r=   r   zMatch.postinite  s     


r?   r.  r   )rw  r)   rx  rz  r4   r   )	r   r   r   r   r   r	  r   r   r   r   s   @r=   ru  ru  @  s          +O) "!% $	
 "&%)
 
 
 
 
 
 
 
&       r?   ru  c                      e Zd ZdZdS )Patternz!Base class for all Pattern nodes.Nr2  r   r?   r=   r}  r}  o  s        ++++r?   r}  c                  d     e Zd ZU dZdZdZded<   ded<   ded<   ded<   d	d
d fdZddZ xZ	S )	MatchCasezClass representing a :class:`ast.match_case` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case 200:
            ...
    ''')
    >>> node.cases[0]
    <MatchCase l.3 at 0x10c24e590>
    patternguardr[   r  r   r   r   r   r   Nr0  r   r   r4   c               `    |  |  |  t                                          |d d d d            d S )Nr-  r  )r   r   r   s     r=   r   zMatchCase.__init__  sO    ! 	 	
 	
 	
 	
 	
r?   r  r}  r  r[   r  c               0    || _         || _        || _        d S r7   r  )r   r  r  r[   s       r=   r   zMatchCase.postinit  s     
			r?   )r   r   r4   r   )r  r}  r  r   r[   r  r4   r   )
r   r   r   r   r   r	  rv  r   r   r   r   s   @r=   r  r  s  s         
 
 3O(LLL26 

 

 

 

 

 

 

 

	 	 	 	 	 	 	 	r?   r  c                  @     e Zd ZdZdZ	 	 	 ddddd fdZddZ xZS )
MatchValuezClass representing a :class:`ast.MatchValue` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case 200:
            ...
    ''')
    >>> node.cases[0].pattern
    <MatchValue l.3 at 0x10c24e200>
    r;   Nr  r   r   r   r   r   r   r   r4   r   c               X    |  t                                          |||||           d S r   r  r   s         r=   r   zMatchValue.__init__  sE     	!!) 	 	
 	
 	
 	
 	
r?   r<   r)   c                   || _         d S r7   r;   r  s     r=   r   zMatchValue.postinit  r  r?   r.  r   r  r   r   r   r   r   r   r   r   r   s   @r=   r  r    s        
 
 !O "!% $	
 "&%)
 
 
 
 
 
 
 
$       r?   r  c                  6     e Zd ZdZdZddddddd fdZ xZS )MatchSingletona  Class representing a :class:`ast.MatchSingleton` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case True:
            ...
        case False:
            ...
        case None:
            ...
    ''')
    >>> node.cases[0].pattern
    <MatchSingleton l.3 at 0x10c2282e0>
    >>> node.cases[1].pattern
    <MatchSingleton l.5 at 0x10c228af0>
    >>> node.cases[2].pattern
    <MatchSingleton l.7 at 0x10c229f90>
    r;   Nr   r<   Literal[True, False, None]r   r   r   r   r   r   r   r4   r   c               b    || _         t                                          |||||           d S r   )r<   r   r   )r   r<   r   r   r   r   r   r   s          r=   r   zMatchSingleton.__init__  sF     
!!) 	 	
 	
 	
 	
 	
r?   )r<   r  r   r   r   r   r   r   r   r   r   r   r4   r   r
  r   s   @r=   r  r    si         ( M "!%!%%) $
 
 
 
 
 
 
 
 
 
 
 
r?   r  c                  @     e Zd ZdZdZ	 	 	 ddddd fdZddZ xZS )MatchSequenceah  Class representing a :class:`ast.MatchSequence` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case [1, 2]:
            ...
        case (1, 2, *_):
            ...
    ''')
    >>> node.cases[0].pattern
    <MatchSequence l.3 at 0x10ca80d00>
    >>> node.cases[1].pattern
    <MatchSequence l.5 at 0x10ca80b20>
    patternsNr  r   r   r   r   r   r   r   r4   r   c               X    |  t                                          |||||           d S r   r  r   s         r=   r   zMatchSequence.__init__  E     	$!!) 	 	
 	
 	
 	
 	
r?   r  list[Pattern]c                   || _         d S r7   r  r   r  s     r=   r   zMatchSequence.postinit       r?   r.  r   r  r  r4   r   r  r   s   @r=   r  r    s           $O "!% $	
 "&%)
 
 
 
 
 
 
 
$! ! ! ! ! ! ! !r?   r  c                  N     e Zd ZdZdZ	 	 	 ddddd fdZddZej        Z	 xZ
S )MatchMappinga  Class representing a :class:`ast.MatchMapping` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case {1: "Hello", 2: "World", 3: _, **rest}:
            ...
    ''')
    >>> node.cases[0].pattern
    <MatchMapping l.3 at 0x10c8a8850>
    keysr  restNr  r   r   r   r   r   r   r   r4   r   c               `    |  |  |  t                                          |||||           d S r   r  r   s         r=   r   zMatchMapping.__init__(  sQ     	$$!!) 	 	
 	
 	
 	
 	
r?   r  r  r  r  r  r(  c               0    || _         || _        || _        d S r7   r  )r   r  r  r  s       r=   r   zMatchMapping.postinit<  s     	 			r?   r.  r   )r  r  r  r  r  r(  r4   r   )r   r   r   r   r   r   r   r   match_mapping_assigned_stmtsr   r   r   s   @r=   r  r    s        
 
 3O "!% $	
 "&%)
 
 
 
 
 
 
 
(	 	 	 	 ;N   r?   r  c                  D     e Zd ZdZdZdZ	 	 	 ddddd fdZddZ xZS )
MatchClassar  Class representing a :class:`ast.MatchClass` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case Point2D(0, 0):
            ...
        case Point3D(x=0, y=0, z=0):
            ...
    ''')
    >>> node.cases[0].pattern
    <MatchClass l.3 at 0x10ca83940>
    >>> node.cases[1].pattern
    <MatchClass l.5 at 0x10ca80880>
    )r   r  kwd_patterns)	kwd_attrsNr  r   r   r   r   r   r   r   r4   r   c               d    |  |  |  |  t                                          |||||           d S r   r  r   s         r=   r   zMatchClass.__init__a  sW     	$!(!!) 	 	
 	
 	
 	
 	
r?   r   r)   r  r  r  r6  r  c               >    || _         || _        || _        || _        d S r7   )r   r  r  r  )r   r   r  r  r  s        r=   r   zMatchClass.postinitv  s'      "(r?   r.  r   )
r   r)   r  r  r  r6  r  r  r4   r   )	r   r   r   r   r   r  r   r   r   r   s   @r=   r  r  M  s           :O"M "!% $	
 "&%)
 
 
 
 
 
 
 
*) ) ) ) ) ) ) )r?   r  c                  N     e Zd ZdZdZ	 	 	 ddddd fdZddZej        Z	 xZ
S )	MatchStarzClass representing a :class:`ast.MatchStar` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case [1, *_]:
            ...
    ''')
    >>> node.cases[0].pattern.patterns[1]
    <MatchStar l.3 at 0x10ca809a0>
    r   Nr  r   r   r   r   r   r   r   r4   r   c               X    |  t                                          |||||           d S r   r  r   s         r=   r   zMatchStar.__init__  r  r?   r   r(  c                   || _         d S r7   r   rb  s     r=   r   zMatchStar.postinit  r   r?   r.  r   )r   r(  r4   r   )r   r   r   r   r   r   r   r   match_star_assigned_stmtsr   r   r   s   @r=   r  r    s        
 
  O "!% $	
 "&%)
 
 
 
 
 
 
 
$    8N   r?   r  c                  N     e Zd ZdZdZ	 	 	 ddddd fdZddZej        Z	 xZ
S )MatchAsa=  Class representing a :class:`ast.MatchAs` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case [1, a]:
            ...
        case {'key': b}:
            ...
        case Point2D(0, 0) as c:
            ...
        case d:
            ...
    ''')
    >>> node.cases[0].pattern.patterns[1]
    <MatchAs l.3 at 0x10d0b2da0>
    >>> node.cases[1].pattern.patterns[0]
    <MatchAs l.5 at 0x10d0b2920>
    >>> node.cases[2].pattern
    <MatchAs l.7 at 0x10d0b06a0>
    >>> node.cases[3].pattern
    <MatchAs l.9 at 0x10d09b880>
    r  r   Nr  r   r   r   r   r   r   r   r4   r   c               \    |  |  t                                          |||||           d S r   r  r   s         r=   r   zMatchAs.__init__  sK     	$$!!) 	 	
 	
 	
 	
 	
r?   r  Pattern | Noner   r(  c               "    || _         || _        d S r7   r  )r   r  r   s      r=   r   zMatchAs.postinit  s     			r?   r.  r   )r  r  r   r(  r4   r   )r   r   r   r   r   r   r   r   match_as_assigned_stmtsr   r   r   s   @r=   r  r    s         0 *O "!% $	
 "&%)
 
 
 
 
 
 
 
&    6N   r?   r  c                  @     e Zd ZdZdZ	 	 	 ddddd fdZddZ xZS )MatchOrzClass representing a :class:`ast.MatchOr` node.

    >>> import astroid
    >>> node = astroid.extract_node('''
    match x:
        case 400 | 401 | 402:
            ...
    ''')
    >>> node.cases[0].pattern
    <MatchOr l.3 at 0x10d0b0b50>
    r  Nr  r   r   r   r   r   r   r   r4   r   c               X    |  t                                          |||||           d S r   r  r   s         r=   r   zMatchOr.__init__  r  r?   r  r  c                   || _         d S r7   r  r  s     r=   r   zMatchOr.postinit  r  r?   r.  r   r  r  r   s   @r=   r  r    s        
 
 $O "!% $	
 "&%)
 
 
 
 
 
 
 
$! ! ! ! ! ! ! !r?   r  .zdict[type, type[NodeNG]]r:   r<   r   List | Set | Tupler  c                j    g }| D ]-}t          |          }||_        |                    |           .|S )zACreate a list of nodes to function as the elements of a new node.)r   r   r   )r<   rK   elementselementelement_nodes        r=   _create_basic_elementsr  %  sG      H & &$W--"%%%%Or?   r   Mapping[Any, Any]Alist[tuple[SuccessfulInferenceResult, SuccessfulInferenceResult]]c                    g }|                                  D ]H\  }}t          |          }||_        t          |          }||_        |                    ||f           I|S )zHCreate a list of node pairs to function as the items of a new dict node.)r  r   r   r   )r   rK   r  r  r<   key_node
value_nodes          r=   _create_dict_itemsr  1  sn     SUHllnn 0 0
U %%"5))
 
:.////Or?   r*   c                   t          | t                    rJ | j        t          vrt	                      }| |_        |S t          | j                 }t          |t          t          t          f          r5 |ddddd          }|
                    t          | |                     |S t          |t                    r5 |ddddd          }|
                    t          | |                     |S t          |           S )z*Return an astroid node for a python value.Nr   )r8   r)   r   r:   r  r  
issubclassrC   r  rD   r   r  r  r  rs   )r<   rK   initializer_clsr   s       r=   r   r   ?  s   %(((((
 i''{{  0O/D#u#566 	"?
 
 
 	0AABBB/4(( 	"?
 
 
 	,UH==>>><<r?   ru  r7   r  r  r.  rt  )rK   r  rG   rH   r   r
   r4   r  )r<   r   rK   r  r4   r  )r   r  rK   r  r4   r  )r<   r
   r4   r*   )r   
__future__r   r   rd  r7  r&  r  typingri  collections.abcr   r   r   r   	functoolsr   r	   r
   r   r   r   r   r   r  r   r   r   astroid.basesr   r   astroid.constr   r   astroid.contextr   r   r   astroid.exceptionsr   r   r   r   r   r   r    r!   r"   r#   r$   astroid.interpreterr%   astroid.managerr&   r  r'   astroid.nodes.constr(   astroid.nodes.node_ngr)   astroid.typingr*   r+   r,   r-   version_infor0   typing_extensionsr2   r3   r>   r  r@   BadOperationMessagerB   AssignedStmtsPossibleNoderC   rt   AssignedStmtsCallInferBinaryOperationInferLHSr   InferUnaryOpr   rN   rp   r  rw   ry   r   r   ParentAssignNodeABCMetar   NoChildrenNodeLookupMixInrE   r  r  r  AssignTypeNoder  r\  rD  r  rF   	Statementr  r  r  OperatorNoder   r  r  r1  r5  eqneltlegtgerW  rv  rl  rZ  rv  rs   r  r  r  r  r  r  r  MultiLineBlockNoder  MultiLineWithElseBlockNoder  r  r  
ImportNoder  r.  r4  r^   rY  ra  rf  r}  r  r  r  r  r  r   r   r  r`   r  rD   r  r  r)  r  r1  r:  rE  rG  rM  r  rP  rY  r   ri  ro  ru  r}  r  r  r  r  r  r  r  r  r  r   r9   r  r  ru   NotImplementedr5   floatcomplexr  r:   r  r  r   r   r?   r=   <module>r     s  
 B A A " " " " " " 



 



      



   B B B B B B B B B B B B % % % % % %                  0 / / / / / / / / / 0 0 0 0 0 0 0 0 7 7 7 7 7 7 7 7 G G G G G G G G G G                          . - - - - - * * * * * * % % % % % % - - - - - - ( ( ( ( ( (            w&&&&&& /....../ / / / &.&
1
1
1 08PQQQ!"ST !!"S!"	 	   h'()
U?N:;T4GHJ  h'()
_dH5G,HHIK #(::; %. . . . &%.4F F F F FV &((    6    H H H H HBu u u u uK0(ck u u u uvY3 Y3 Y3 Y3 Y3 Y3 Y3 Y3x$
 $
 $
 $
 $
 79U$
 $
 $
NI3 I3 I3 I3 I3;"K$> I3 I3 I3X < nK nK nK nK nKnK nK nKb   OS    D (,$: $: $: $: $:NE9 E9 E9 E9 E9(+*F E9 E9 E9P    ["   <4> 4> 4> 4> 4>[')> 4> 4> 4>n0 0 0 0 0*K,A 0 0 0f{
 {
 {
 {
 {
 8+:O{
 {
 {
|n
 n
 n
 n
 n
K$ n
 n
 n
bw> w> w> w> w>V w> w> w>t    K&(=   V V V V V6 V V Vt +
+	
+	
+

%%	6 	6 	 	 	 	 	@  @  @  @  @ f @  @  @ FM M M M MF M M M`Y Y Y Y YK& Y Y Yx    {);+@   ( ( ( ( ( ( ( (V* * * * *k* * * *Z%  %  %  %  % [')> %  %  % Py y y y y68 y y yxB B B B B;  B B BD&' &' &' &' &'* &' &' &'RKT KT KT KT KT"K$>@UKT KT KT\F F F F F*F F FR    s   &    F   <g g g g g' g g gT(9 (9 (9 (9 (9 (9 (9 (9V? ? ? ? ?[')> ? ? ?DA; A; A; A; A;	/1F A; A; A;HB> B> B> B> B>F B> B> B>JFF FF FF FF FF[# FF FF FFR* * * * *f * * *ZDK DK DK DK DK= DK DK DKN5 5 5 5 5{);+@ 5 5 5p) ) ) ) )* ) ) )X    ;%{'<   ) ) ) ) )K! ) ) )X    ["   8    -   &] ] ] ] ]F ] ] ]@- - - - -k* - - -`s8 s8 s8 s8 s8 s8 s8 s8ls" s" s" s" s"+
0+2G s" s" s"lb" b" b" b" b"k4k6K b" b" b"JDK DK DK DK DKM DK DK DKN:( :( :( :( :(*K,A :( :( :(z+ + + + +k( + + +\) ) ) ) );- ) ) )Z 
			 L> L> L> L> L>k& L> L> L>^B; B; B; B; B;K2K4I B; B; B;Je e e e e*e e ePB B B B B B B B    F   8= = = = = = = =I I I I I+ I I IW# W# W# W# W#V W# W# W#t: : : : : : : :z{+ {+ {+ {+ {+* {+ {+ {+|    k(   D    f   J, , , , ,K!;#A , , ,^, , , , ,f , , ,* * * * *. * * *Z" " " " " " " "J(
 (
 (
 (
 (
W (
 (
 (
V&! &! &! &! &!G &! &! &!R1 1 1 1 1;-w 1 1 1h4) 4) 4) 4) 4) 4) 4) 4)n' ' ' ' '*G ' ' 'T: : : : :k(' : : :z"! "! "! "! "!g "! "! "!T 	$	5$DJJD%DIIu%	5U	5'	    "	 	 	 	   " " " " " "r?   