
    yIf	j                       d Z ddlmZ ddlZddlZddl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 ddlmZmZmZm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 ddl m!Z!m"Z"m#Z# erddl$m%Z% ddhZ&ere&'                    d           h dZ(	 d5d6dZ) G d d          Z*	 d5d7d Z+d8d'Z, G d( d)e*          Z- G d* d"e-          Z. G d+ d,e*          Z/ G d- d.e/          Z0 G d/ d0e-          Z1 G d1 d2e1          Z2 G d3 d4e-          Z3dS )9zXThis module contains base classes and functions for the nodes and some
inference utils.
    )annotationsN)IterableIterator)TYPE_CHECKINGAnyLiteral)
decoratorsnodes)
PY310_PLUS)CallContextInferenceContextbind_context_to_nodecopy_context)AstroidTypeErrorAttributeInferenceErrorInferenceErrorNameInferenceError)objectmodel)InferenceErrorInfoInferenceResultSuccessfulInferenceResult)UninferableUninferableBase
safe_infer)
Constraintzbuiltins.propertyzabc.abstractpropertyzenum.property>   lazyreifyLazyPropertylazypropertylazy_propertylazyattributecache_readonlycachedpropertylazy_attributecached_propertyDynamicClassAttributemeth!nodes.FunctionDef | UnboundMethodcontextInferenceContext | Nonereturnboolc                n   |                      |          }t                              |          rdS d |D             t          fdt          D                       rdS | j        sdS | j        j        pdD ]}t          ||          }|t          |t                    r+t          |t          j
                  rv|j        D ]n}t          |t          j                  s|                    |j                  \  }}t          |t          j                  r|j        dk    r|j        dk    r  dS odS )	Nr)   Tc                n    h | ]2}t          |t                    |                    d           d         3S ).)
isinstancer   split).0names     A/var/www/piapp/venv/lib/python3.11/site-packages/astroid/bases.py	<setcomp>z_is_property.<locals>.<setcomp>J   sG       $00

3      c              3      K   | ]}|v V  	d S N )r4   r5   strippeds     r6   	<genexpr>z_is_property.<locals>.<genexpr>O   s(      
<
<48
<
<
<
<
<
<r8   Fr;   builtinsproperty)decoratornames
PROPERTIESintersectionanyPOSSIBLE_PROPERTIESr	   r
   r   r2   r   ClassDefbasesNamelookupr5   Module)	r'   r)   r@   	decoratorinferred
base_classmodule_r<   s	           @r6   _is_propertyrO   D   sh    (((99N~.. t "  H
 
<
<
<
<(;
<
<
<<< t ? u_*0b    	i999z(ODDh// 
	 &n 	  	 
!*ej99 &--jo>>	vu|44 z11":554445r8   c                  >    e Zd ZU dZded<   	 ddd	ZddZ	 dddZdS )ProxyzA simple proxy object.

    Note:

    Subclasses of this object will need a custom __getattr__
    if new instance attributes are created. See the Const class
    zAnodes.ClassDef | nodes.FunctionDef | nodes.Lambda | UnboundMethod_proxiedNproxiedHnodes.ClassDef | nodes.FunctionDef | nodes.Lambda | UnboundMethod | Noner+   Nonec                n    |+t          | t          j        t          t          f          sJ d S || _        d S r:   )r2   r
   Const	Generator	UnionTyperR   )selfrS   s     r6   __init__zProxy.__init__s   s;     ? dU[)Y$GHHHHHHH#DMMMr8   r5   strr   c                |    |dk    r| j         j        S || j        v r| j        |         S t          | j        |          S )NrR   )	__class__rR   __dict__getattr)rZ   r5   s     r6   __getattr__zProxy.__getattr__   sD    :>**4=  =&&t}d+++r8   r)   r*   kwargsKcollections.abc.Generator[InferenceResult, None, InferenceErrorInfo | None]c              +     K   | V  d S r:   r;   )rZ   r)   rb   s      r6   inferzProxy.infer   s       




r8   r:   )rS   rT   r+   rU   )r5   r\   r+   r   )r)   r*   rb   r   r+   rc   )__name__
__module____qualname____doc____annotations__r[   ra   re   r;   r8   r6   rQ   rQ   h   s           POOO 	$ $ $ $ $$, , , , 26      r8   rQ   stmtsIterable[InferenceResult]frame"nodes.NodeNG | BaseInstance | None6collections.abc.Generator[InferenceResult, None, None]c              #    K   d}d}|<|j         }|                                }||j                            |i           }ni }nd}i }t	                      }| D ]}t          |t                    r|V  d}|                    ||          |_         	 t                      }|	                                D ]/\  }	}
|	
                    |          s|                    |
           0|                    |          D ]&t          fd|D                       rV  d}$d}'# t          $ r Y t          $ r t           V  d}Y w xY w|s|rt           V  dS |st          d| ||          dS )zGReturn an iterator on statements inferred by each statement in *stmts*.FNTr.   c              3  B   K   | ]}|                               V  d S r:   )satisfied_by)r4   
constraintinfs     r6   r=   z_infer_stmts.<locals>.<genexpr>   s1      WW
z..s33WWWWWWr8   z.Inference failed for all members of {stmts!r}.)rk   rm   r)   )
lookupnamecloneconstraintsgetr   r2   r   _infer_namesetitems	parent_ofupdatere   allr   r   r   )rk   r)   rm   rK   constraint_failedr5   rw   stmtstmt_constraintsconstraint_stmtpotential_constraintsrt   s              @r6   _infer_stmtsr      s      H!--//!-11$;;KKKK"$$  dO,, 	JJJH!--eT::	03:E:K:K:M:M C C6!6&0066 C$++,ABBBzz'z22 - -WWWWFVWWWWW -III#HH(,%%- " 	 	 	H 	 	 	HHH	  
) 
 
<	
 
 
 	

 
s   BD$$
E0EEinstanceInstancemethod_namer\   r   bool | UninferableBasec                $   t          |                     ||          d           }|rt          |d          r|                                st          S 	 t          g |          |_        |                    | |          D ]x}t          |t                    r|c S 	 t          |
                    |                    }n## t          $ r}t          |          |d }~ww xY w|                                c S n# t          $ r Y nw xY wt          S )Nr.   infer_call_resultargscallee)nextigetattrhasattrcallabler   r   callcontextr   r2   r   re   StopIterationr   
bool_value)r   r   r)   r'   valuerK   es          r6   _infer_method_result_truthr      sK   
 !!+w!??FFD 122 }} 		"-2d"C"C"CG//'/JJ - -e_55 ! LLLA#EKKK$@$@AAHH$ A A A(999q@A**,,,,,-  	 	 	D	s7   AC; #C C; 
C!CC!!C; ;
DDc                  b    e Zd ZU dZded<   ded<   ddZ	 	 dddZ	 dddZ	 dddZ	 dd dZ	d	S )!BaseInstancezWAn instance base class, which provides lookup methods for potential
    instances.
    znodes.ClassDefrR   zobjectmodel.ObjectModelspecial_attributesr+   r\   c                    dS NzInstance ofr;   rZ   s    r6   display_typezBaseInstance.display_type       }r8   NTr5   r)   r*   lookupclassr,   list[InferenceResult]c                   	 | j                             ||          }ny# t          $ rl}| j        r)|| j        v r | j                            |          gcY d }~S |r"| j                             ||d          cY d }~S t          | ||          |d }~ww xY w|r1	 || j                             ||d          z   S # t          $ r Y nw xY w|S )NFclass_context)target	attributer)   )rR   instance_attrr   r   rH   r`   )rZ   r5   r)   r   valuesexcs         r6   r`   zBaseInstance.getattr   s;   	]00w??FF& 	 	 	& >443J+J+J/66t<<======= Q },,T7%,PPPPPPPP)tW  	  	 5 5' !6 ! !   +   s>    
B*BBB6B<BBB: :
CCIterator[InferenceResult]c           	   #    K   |st                      }	 ||_        |                     ||d          }t          |                     ||          ||           E d{V  dS # t
          $ r 	 | j        j        j        dk    r | j        	                    ||d          }|                     ||          E d{V  Y dS # t
          $ r}t          di t          |          |d}~ww xY ww xY w)zInferred getattr.F)r   )rm   NrE   r   r;   )r   ru   r`   r   
_wrap_attrr   rR   r^   rf   r   r   vars)rZ   r5   r)   get_attrattrserrors         r6   r   zBaseInstance.igetattr  sS       	)&((G	?!%G||D'u|EEH#'22G4            ' 
	? 
	? 
	?	? =*3zAA..tWE.RR??5'::::::::::::* ? ? ?$33tE{{33>?
	?s+   AA! !
C+,AB>>
C'C""C''C+r   rl   c              #  v  K   |D ]}t          |t                    r?t          |          r|                    | |          E d{V  Ct	          ||           V  Vt          |t
          j                  r?|j        j        r.|j        j        d         j	        dk    rt	          ||           V  |V  |V  dS )z8Wrap bound methods of attrs in a InstanceMethod proxies.Nr   rZ   )
r2   UnboundMethodrO   r   BoundMethodr
   Lambdar   	argumentsr5   )rZ   r   r)   attrs       r6   r   zBaseInstance._wrap_attr$  s        	 	D$.. %% 2#55dGDDDDDDDDDD%dD111111D%,// 9& 49+>q+A+F&+P+P%dD11111







	 	r8   caller SuccessfulInferenceResult | Nonec              #    K   t          ||           }d}t          |t          j                  rHt          |j        t          j                  r)|                     |j        j        |          D ]}d}|V  	| j                            d|          D ]K}t          |t                    s|
                                s,|                    ||          D ]}d}|V  	L|st          | ||          dS )z5Infer what a class instance is returning when called.FT__call__)noder   r)   N)r   r2   r
   Callfunc	Attributer   attrnamerR   r   r   r   r   )rZ   r   r)   rK   resr   s         r6   r   zBaseInstance.infer_call_result6  s       'w55 fej)) 	jeo.V.V 	}}V[%97CC  				 M**:w?? 	 	D$00  --fg>>  				  	L d67KKKK	L 	Lr8   r+   r\   NT)r5   r\   r)   r*   r   r,   r+   r   r:   r5   r\   r)   r*   r+   r   )r   rl   r)   r*   r+   r   r   r   r)   r*   r+   r   )
rf   rg   rh   ri   rj   r   r`   r   r   r   r;   r8   r6   r   r      s           ////    ,0 	    @ =A? ? ? ? ?4 TX    * ,0L L L L L L Lr8   r   c                       e Zd ZdZ ej                    Zd! fdZej	        d"d            Z
d#dZd#dZd$dZd#dZd#dZ	 d%d&dZ	 d%d'd Z xZS )(r   z-A special node representing a class instance.rS   nodes.ClassDef | Noner+   rU   c                J    t                                          |           d S r:   )superr[   )rZ   rS   r^   s     r6   r[   zInstance.__init__U  s!    !!!!!r8   opnodenodes.AugAssign | nodes.BinOpoperatorr\   otherr   r)   r   methodr   &Generator[InferenceResult, None, None]c                .    |                     | |          S r:   )r   )rZ   r   r   r   r)   r   s         r6   infer_binary_opzInstance.infer_binary_opX  s     ''g666r8   c                    d                     | j                                        j        | j        j        t	          |                     S )Nz<Instance of {}.{} at 0x{}>)formatrR   rootr5   idr   s    r6   __repr__zInstance.__repr__c  s=    ,33M  %t}'92d88
 
 	
r8   c                ^    d| j                                         j         d| j         j         S )NzInstance of r0   )rR   r   r5   r   s    r6   __str__zInstance.__str__h  s.    Ndm00227NN$-:LNNNr8   r,   c                b    	 | j                             dd           dS # t          $ r Y dS w xY w)Nr   Fr   T)rR   r`   r   r   s    r6   r   zInstance.callablek  sI    	M!!*E!BBB4& 	 	 	55	s     
..c                4    | j                                         S r:   )rR   qnamer   s    r6   pytypezInstance.pytyper  s    }""$$$r8   c                    dS r   r;   r   s    r6   r   zInstance.display_typeu  r   r8   Nr*   r   c                    |pt                      }| |_        	 t          | d|          }nC# t          t          f$ r/ 	 t          | d|          }n# t          t          f$ r Y Y dS w xY wY nw xY w|S )aW  Infer the truth value for an Instance.

        The truth value of an instance is determined by these conditions:

           * if it implements __bool__ on Python 3 or __nonzero__
             on Python 2, then its bool value will be determined by
             calling this special method and checking its result.
           * when this method is not defined, __len__() is called, if it
             is defined, and the object is considered true if its result is
             nonzero. If a class defines neither __len__() nor __bool__(),
             all its instances are considered true.
        __bool____len__T)r   	boundnoder   r   r   )rZ   r)   results      r6   r   zInstance.bool_valuex  s     /-// 	/j'JJFF 78 	 	 	3D)WMM+^<   ttt 	 s2   + A+AA+A% A+$A%%A+*A+indexnodes.ConstInferenceResult | Nonec                   t          ||           }|s|}t          |                     d|          d           }t          |g|          |_        t          |t                    st          d| |          t          |j	        j
                  dk    rt          d| |          t          |                    | |          d           S )N__getitem__r.   r   z(Could not find __getitem__ for {node!r}.)r   r)      z8__getitem__ for {node!r} does not have correct signature)r   r   r   r   r   r2   r   r   lenr   r   r   r   )rZ   r   r)   new_contextr   s        r6   getitemzInstance.getitem  s     +7D99 	"!GdmmM7mCCTJJ"-E76"J"J"J&+.. 	 :w    v{$%%**"J   
 F,,T;??FFFr8   )rS   r   r+   rU   )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   )rf   rg   rh   ri   r   InstanceModelr   r[   r	   yes_if_nothing_inferredr   r   r   r   r   r   r   r   __classcell__r^   s   @r6   r   r   P  s'       772244" " " " " " '7 7 7 ('7
 
 
 

O O O O   % % % %    26    : FJG G G G G G G G Gr8   c                      e Zd ZU dZded<    ej                    Zded<   ddZdd
Z	ddZ
dd dZ	 dd!dZ	 dd"dZd#dZdd$dZdS )%r   z>A special node representing a method not bound to an instance.r(   rR   z=objectmodel.BoundMethodModel | objectmodel.UnboundMethodModelr   r+   r\   c                    | j         j        s
J d            | j         j                                        }d                    | j        j        | j         j        |                                t          |                     S )NExpected a parent nodez<{} {} of {} at 0x{})	rR   parentrm   r   r^   rf   r5   r   r   )rZ   rm   s     r6   r   zUnboundMethod.__repr__  sk    }#==%====$**,,%,,N#T]%74
 
 	
r8   Literal[0, 1]c                    dS )Nr   r;   r   s    r6   implicit_parametersz!UnboundMethod.implicit_parameters  s    qr8   r,   c                    dS NFr;   r   s    r6   is_boundzUnboundMethod.is_bound      ur8   Nr5   r)   r*   c                    || j         v r| j                             |          gS | j                            ||          S r:   )r   rH   rR   r`   rZ   r5   r)   s      r6   r`   zUnboundMethod.getattr  sB    4***+2248899}$$T7333r8   r   c                    || j         v r(t          | j                             |          f          S | j                            ||          S r:   )r   iterrH   rR   r   r   s      r6   r   zUnboundMethod.igetattr  sL     4***077==?@@@}%%dG444r8   r   r   c                b   | j         j        dk    r| j         j        s
J d            | j         j                                                                        }|                    d          r*|dk    r$|                     ||pt                                S | j                             ||          S )a  
        The boundnode of the regular context with a function called
        on ``object.__new__`` will be of type ``object``,
        which is incorrect for the argument in general.
        If no context is given the ``object.__new__`` call argument will
        be correctly inferred except when inside a call that requires
        the additional context (such as a classmethod) of the boundnode
        to determine which class the method was called from
        __new__r   z	builtins.builtins.type)	rR   r5   r   rm   r   
startswith_infer_builtin_newr   r   )rZ   r   r)   r   s       r6   r   zUnboundMethod.infer_call_result  s    " =**='AA)AAAAM(..006688E,, V/1I1I..vw7TBRBTBTUUU}..vw???r8   r   Ocollections.abc.Generator[nodes.Const | Instance | UninferableBase, None, None]c              #  *  K   t          |t          j                  sd S |j        sd S t	          |j                  dk    rd }t          |j        d         t          j                  r|j        d         j        }nNt          |j        d                                         d           }t          |t          j                  r|j        }|6t          j	        |          }t          |t          j
                  rJ |V  d S |j                            |j        d                   }|j        d                             |          D ]L}t          |t                    r|V  t          |t          j                  rt          |          V  t           d S )N   r   r.   )r2   r
   r   r   r   rW   r   r   re   const_factory	EmptyNodeextra_contextrx   r   rE   r   r   )rZ   r   r)   r   inferred_argconstnode_contextrK   s           r6   r  z UnboundMethod._infer_builtin_new  s      &%*-- 	F{ 	Fv{aE&+a.%+66 /A,#FKN$8$8$:$:DAAlEK88 /(.E +E22%eU_=====,00Q@@A,,\,BB 	! 	!H(O44 (EN33 )x(((((  	! 	!r8   Literal[True]c                    dS r   r;   rZ   r)   s     r6   r   zUnboundMethod.bool_value      tr8   r   r+   r   r   r:   )r5   r\   r)   r*   r   r   )r   r   r)   r   r+   r  r)   r*   r+   r  )rf   rg   rh   ri   rj   r   UnboundMethodModelr   r   r   r   r`   r   r   r  r   r;   r8   r6   r   r     s        HH//// 	'&((  ) ) ) )
 
 
 
      4 4 4 4 4 =A5 5 5 5 5 ,0@ @ @ @ @2 !  !  !  !D      r8   r   c                  t     e Zd ZdZ ej                    Zd fdZdd
ZddZ	ddZ
	 dd fdZdddZ xZS ) r   z:A special node representing a method bound to an instance.proxy0nodes.FunctionDef | nodes.Lambda | UnboundMethodboundr   r+   rU   c                X    t                                          |           || _        d S r:   )r   r[   r  )rZ   r  r  r^   s      r6   r[   zBoundMethod.__init__  s(    
 	


r8   r   c                     | j         dk    rdS dS )Nr   r   r  )r5   r   s    r6   r   zBoundMethod.implicit_parameters  s    9	!!1qr8   r  c                    dS r   r;   r   s    r6   r   zBoundMethod.is_bound  r  r8   r   
nodes.Callr)   r   r   c                   ddl m} 	 t          |j        d                                                 }n## t
          $ r}t                    |d}~ww xY wt          |t          j	                  sdS |
                    d          sdS 	 t          |j        d                                                 }n## t
          $ r}t                    |d}~ww xY wt          |t          j                  sdS t          |j        t                    sdS 	 t          |j        d                                                 }n## t
          $ r}t                    |d}~ww xY wt          |t          j                  sdS 	 fd|j        D             }n## t
          $ r}t                    |d}~ww xY wt!          d	 |D                       rdS 	 t          |j        d
                                                 }	n## t
          $ r}t                    |d}~ww xY wt          |	t          j                  sdS t%          j        t(                    }
|	j        D ]\  }}	 t          |                                        }n## t
          $ r}t                    |d}~ww xY w	 t          |                                        }n## t
          $ r}t                    |d}~ww xY wt          |t          j                  r:t          |j        t                    r |
|j                                     |           |                    |j        |j        pd|j        pd||j        |j                  } |||j        |j        |j        |j                  }|                    |j        |gdd|g            |
|_        |S )zTry to infer what type.__new__(mcs, name, bases, attrs) returns.

        In order for such call to be valid, the metaclass needs to be
        a subtype of ``type``, the name needs to be a string, the bases
        needs to be a tuple of classes
        r   )Passr.   Nr  r  r   c                V    g | ]%}t          |                                         &S )r.   )r   re   )r4   eltr)   s     r6   
<listcomp>z4BoundMethod._infer_type_new_call.<locals>.<listcomp>N  s/    UUU3d399W9#=#=>>UUUr8   c              3  L   K   | ]}t          |t          j                   V   d S r:   )r2   r
   rE   )r4   bases     r6   r=   z3BoundMethod._infer_type_new_call.<locals>.<genexpr>Q  s1      OO:dEN333OOOOOOr8      )r5   lineno
col_offsetr   
end_linenoend_col_offset)r   r$  r%  r&  r'  T)rF   bodyr	   newstyle	metaclasskeywords)astroid.nodesr  r   r   re   r   r   r2   r
   rE   is_subtype_ofrW   r   r\   TupleeltsrC   Dictcollectionsdefaultdictlistr{   appendr^   r$  r%  r&  r'  postinitlocals)rZ   r   r)   r  mcsr   r5   rF   inferred_basesr   
cls_localskeyr   clsemptys     `            r6   _infer_type_new_callz BoundMethod._infer_type_new_call!  sc    	'&&&&&	9v{1~++G+<<==CC 	9 	9 	9 111q8	9#u~.. 	4  11 	4	9A,,W,==>>DD 	9 	9 	9 111q8	9$,, 	4$*c** 	4	9Q--g->>??EE 	9 	9 	9 111q8	9%-- 	4	9UUUU%*UUUNN 	9 	9 	9 111q8	9OOOOOOO 	4	9Q--g->>??EE 	9 	9 	9 111q8	9%,, 	47B7Nt7T7T
+ 	4 	4JC=399W95566  = = =$W5551<==U[[[99::  = = =$W5551<= #u{++ 4
39c0J0J 439%,,U333 mm=%A(-A(!0  
 
 =((!0
 
 
 	* 	 	
 	
 	
  

s   .8 
AAA.B> >
CCC.E	 	
E)E$$E)	F 
F='F88F=.H 
H+H&&H+0#J
J4J//J48#K
K<&K77K<Nr   r*   r   c                   t          || j                  }t          | j        t          j                  ru| j        j        dk    re| j        dk    rZt          |t          j                  r@t          |j                  dk    r(| 	                    ||          }|rt          |f          S t                                          ||          S )Ntyper      )r   r  r2   r
   rE   r5   r   r   r   r=  r   r   r   )rZ   r   r)   new_clsr^   s       r6   r   zBoundMethod.infer_call_result  s    
 'w
;;tz5>22
	(
6))	Y&&65:.. 'FK  A%% //@@G (WJ'''ww((999r8   c                    dS r   r;   r  s     r6   r   zBoundMethod.bool_value  r  r8   )r  r  r  r   r+   rU   r  )r+   r  )r   r  r)   r   r+   r   r:   r   r  )rf   rg   rh   ri   r   BoundMethodModelr   r[   r   r   r=  r   r   r   r   s   @r6   r   r     s        DD5577           c c c cP ,0: : : : : : :(        r8   r   c                  n     e Zd ZU dZded<   	 dd fdZddZddZddZddZ	dddZ
ddZddZ xZS )rX   zeA special node representing a generator.

    Proxied class is set once for all in raw_building.
    zobjectmodel.GeneratorModelr   Nr   nodes.FunctionDefgenerator_initial_contextr*   r+   rU   c                    t                                                       || _        t          |          | _        t          j                    t          _        d S r:   )	r   r[   r   r   _call_contextr   GeneratorModelrX   r   )rZ   r   rF  r^   s      r6   r[   zGenerator.__init__  sL    
 	)*CDD (3'A'C'C	$$$r8   r   c              #  T   K   | j                             | j                  E d {V  d S r:   )r   infer_yield_resultrH  r   s    r6   infer_yield_typeszGenerator.infer_yield_types  s7      ;11$2DEEEEEEEEEEEr8   Literal[False]c                    dS r   r;   r   s    r6   r   zGenerator.callable  r   r8   r\   c                    dS )Nzbuiltins.generatorr;   r   s    r6   r   zGenerator.pytype  s    ##r8   c                    dS )NrX   r;   r   s    r6   r   zGenerator.display_type      {r8   r)   r  c                    dS r   r;   r  s     r6   r   zGenerator.bool_value  r  r8   c                R    d| j         j         d| j         dt          |            dS )Nz<Generator() l. at 0x>rR   r5   r$  r   r   s    r6   r   zGenerator.__repr__  0    ST]/SST[SS4SSSSr8   c                "    d| j         j         dS )Nz
Generator()rR   r5   r   s    r6   r   zGenerator.__str__      1DM.1111r8   r:   )r   rE  rF  r*   r+   rU   )r+   r   r+   rM  r   r  )rf   rg   rh   ri   rj   r[   rL  r   r   r   r   r   r   r   r   s   @r6   rX   rX     s          3222
 >B
D 
D 
D 
D 
D 
D 
DF F F F   $ $ $ $       T T T T2 2 2 2 2 2 2 2r8   rX   c                  2    e Zd ZdZd
dZddZddZddZd	S )AsyncGeneratorz-Special node representing an async generator.r+   #Literal['builtins.async_generator']c                    dS )Nzbuiltins.async_generatorr;   r   s    r6   r   zAsyncGenerator.pytype  s    ))r8   r\   c                    dS )Nr_  r;   r   s    r6   r   zAsyncGenerator.display_type  s    r8   c                R    d| j         j         d| j         dt          |            dS )Nz<AsyncGenerator(rT  rU  rV  rW  r   s    r6   r   zAsyncGenerator.__repr__  s1    X$-"4XX$+XXRPTXXXXXXr8   c                "    d| j         j         dS )NzAsyncGenerator(rZ  r[  r   s    r6   r   zAsyncGenerator.__str__  s    6!36666r8   N)r+   r`  r   )rf   rg   rh   ri   r   r   r   r   r;   r8   r6   r_  r_    sn        77* * * *       Y Y Y Y7 7 7 7 7 7r8   r_  c                  Z     e Zd ZdZ	 dd fd
ZddZdddZddZddZddZ	ddZ
 xZS )rY   zoSpecial node representing new style typing unions.

    Proxied class is set once for all in raw_building.
    Nleft(UnionType | nodes.ClassDef | nodes.Constrightr   nodes.NodeNG | Noner+   rU   c                r    t                                                       || _        || _        || _        d S r:   )r   r[   r   rf  rh  )rZ   rf  rh  r   r^   s       r6   r[   zUnionType.__init__  s4     		


r8   rM  c                    dS r   r;   r   s    r6   r   zUnionType.callable  r   r8   r)   r*   r  c                    dS r   r;   r  s     r6   r   zUnionType.bool_value  r  r8   Literal['types.UnionType']c                    dS )Nztypes.UnionTyper;   r   s    r6   r   zUnionType.pytype  s      r8   r\   c                    dS )NrY   r;   r   s    r6   r   zUnionType.display_type  rQ  r8   c                R    d| j         j         d| j         dt          |            dS )Nz<UnionType(rT  rU  rV  rW  r   s    r6   r   zUnionType.__repr__  rX  r8   c                "    d| j         j         dS )Nz
UnionType(rZ  r[  r   s    r6   r   zUnionType.__str__  r\  r8   r:   )rf  rg  rh  rg  r   ri  r+   rU   r]  r  )r+   rm  r   )rf   rg   rh   ri   r[   r   r   r   r   r   r   r   r   s   @r6   rY   rY     s          '+		 	 	 	 	 	 	       ! ! ! !   T T T T2 2 2 2 2 2 2 2r8   rY   r:   )r'   r(   r)   r*   r+   r,   )rk   rl   r)   r*   rm   rn   r+   ro   )r   r   r   r\   r)   r   r+   r   )4ri   
__future__r   r1  collections.abcr   r   typingr   r   r   astroidr	   r
   astroid.constr   astroid.contextr   r   r   r   astroid.exceptionsr   r   r   r   astroid.interpreterr   astroid.typingr   r   r   astroid.utilr   r   r   astroid.constraintr   rA   addrD   rO   rQ   r   r   r   r   r   r   rX   r_  rY   r;   r8   r6   <module>r~     s  
  # " " " " "         . . . . . . . . . . . . . . . . . . % % % % % % % % $ $ $ $ $ $                       , + + + + +         
 B A A A A A A A A A .------ "#9:
 $NN?###     QU! ! ! ! !H' ' ' ' ' ' ' 'Z 153
 3
 3
 3
 3
l   0mL mL mL mL mL5 mL mL mL`WG WG WG WG WG| WG WG WGt^ ^ ^ ^ ^E ^ ^ ^BP P P P P- P P Pf*2 *2 *2 *2 *2 *2 *2 *2Z7 7 7 7 7Y 7 7 7 !2 !2 !2 !2 !2 !2 !2 !2 !2 !2r8   