
    cc                       d Z ddlmZ ddlZddlZddlZddl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mZmZ ddlmZm Z m!Z! ej"        dk    rddlm#Z# nddl$m#Z# erddl%m&Z&  e!d          Z' e!d          Z( e!d          Z)dZ*dZ+ddhZ,ere,-                    d           h dZ.d4d5dZ/ G d d          Z0	 d4d6d$Z1d% Z2 G d& d'e0          Z3 G d( d)e3          Z4 G d* d+e0          Z5 G d, d-e5          Z6 G d. d/e3          Z7 G d0 d1e7          Z8 G d2 d3e3          Z9dS )7zXThis module contains base classes and functions for the nodes and some
inference utils.
    )annotationsN)Sequence)TYPE_CHECKINGAnyClassVar)
decoratorsnodes)
PY310_PLUS)CallContextInferenceContextbind_context_to_nodecopy_context)AstroidTypeErrorAttributeInferenceErrorInferenceErrorNameInferenceError)InferBinaryOpInferenceErrorInfoInferenceResult)Uninferablelazy_descriptorlazy_import)      )Literal)
Constraintzinterpreter.objectmodelhelpersmanager__bool__builtinszbuiltins.propertyzabc.abstractpropertyzenum.property>   lazyreifyLazyPropertylazypropertylazy_propertylazyattributecache_readonlycachedpropertylazy_attributecached_propertyDynamicClassAttributecontextInferenceContext | Nonereturnboolc                   |                      |          }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          u r*|j
        j        dk    rR|j        D ]J}|j
        j        dk    r|                    |j                  \  }}|j        d	k    r|j        d
k    r  dS KdS )Nr,   Tc                V    h | ]&}|t           u|                    d           d         'S ).)r   split).0names     -lib/python3.11/site-packages/astroid/bases.py	<setcomp>z_is_property.<locals>.<setcomp>Q   sA        $$k:Q

3      c              3      K   | ]}|v V  	d S N )r6   r7   strippeds     r8   	<genexpr>z_is_property.<locals>.<genexpr>T   s(      
<
<48
<
<
<
<
<
<r:   Fr=   ClassDefNamer    property)decoratornames
PROPERTIESintersectionanyPOSSIBLE_PROPERTIESr   r	   r   
safe_inferr   	__class____name__baseslookupr7   )	methr,   rC   	decoratorinferred
base_classmodule_r>   s	           @r8   _is_propertyrS   M   sX   (((99N~.. t (6  H 
<
<
<
<(;
<
<
<<< t ? u_*0b 
  
 	%%i%AA 	x;6 	&*4 	 &n    
'0F: &--jo>>	;*,  J1N  4445r:   c                  @    e Zd ZU dZdZded<   	 dddZ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
    N,nodes.ClassDef | nodes.Lambda | Proxy | None_proxiedproxiedr.   Nonec                n    |+t          | t          j        t          t          f          sJ d S || _        d S r<   )
isinstancer	   Const	Generator	UnionTyperW   )selfrX   s     r8   __init__zProxy.__init__v   s>      
	$ dU[)Y$GHHHHHHH#DMMMr:   c                |    |dk    r| j         j        S || j        v r| j        |         S t          | j        |          S )NrW   )rI   rW   __dict__getattr)r_   r7   s     r8   __getattr__zProxy.__getattr__   sH    : 	+>**4=  	'=&&t}d+++r:   r,   r-   kwargsr   Kcollections.abc.Generator[InferenceResult, None, InferenceErrorInfo | None]c              +     K   | V  d S r<   r=   )r_   r,   re   s      r8   inferzProxy.infer   s       




r:   r<   )rX   rV   r.   rY   )r,   r-   re   r   r.   rf   )	rJ   
__module____qualname____doc__rW   __annotations__r`   rd   rh   r=   r:   r8   rU   rU   i   s           	     
 GK$ $ $ $ $, , , 26      r:   rU   stmts5Sequence[nodes.NodeNG | type[Uninferable] | Instance]framenodes.NodeNG | Instance | None6collections.abc.Generator[InferenceResult, None, None]c              #    K   d}d}|7|j         }|                                }|j                            |i           }nd}i }t	                      }| D ]}|t
          u 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*.FNTr1   c              3  B   K   | ]}|                               V  d S r<   )satisfied_by)r6   
constraintinfs     r8   r?   z_infer_stmts.<locals>.<genexpr>   s1      WW
z..s33WWWWWWr:   z.Inference failed for all members of {stmts!r}.)rm   ro   r,   )
lookupnamecloneconstraintsgetr   r   _infer_namesetitems	parent_ofupdaterh   allr   r   )rm   r,   ro   rO   constraint_failedr7   ry   stmtstmt_constraintsconstraint_stmtpotential_constraintsrv   s              @r8   _infer_stmtsr      s      H %!--//)--dB77"$$  ; 	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
D6D65D6c                   t          |                     ||          d           }|rt          |d          r|                                st          S 	 t          g |          |_        |                    | |          D ]l}|t          u 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 )Nr1   infer_call_resultargscallee)nextigetattrhasattrcallabler   r   callcontextr   rh   StopIterationr   
bool_value)instancemethod_namer,   rM   valuerO   es          r8   _infer_method_result_truthr      sF    !!+w!??FFD 122 }} 		"-2d"C"C"CG//'/JJ - -K' ! LLLA#EKKK$@$@AAHH$ A A A(999q@A**,,,,,-  	 	 	D	s6   ;C/ #B54C/ 5
C?CCC/ /
C<;C<c                  H    e Zd ZdZdZ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.
    Nr.   strc                    dS NzInstance ofr=   r_   s    r8   display_typezBaseInstance.display_type       }r:   Tr,   r-   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,   )rW   instance_attrr   special_attributesrL   rc   )r_   r7   r,   lookupclassvaluesexcs         r8   rc   zBaseInstance.getattr   s=   	]00w??FF& 	 	 	& >443J+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c           	   #  4  K   |st                      }	 ||_        |                    | j                  rt	          d| |          |                     ||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.z%Cannot infer the same attribute again)messagenoder,   F)r   )ro   Nr@   r   r=   )r   rw   pushrW   r   rc   r   
_wrap_attrr   rI   rJ   r   vars)r_   r7   r,   get_attrattrserrors         r8   r   zBaseInstance.igetattr  s      	)&((G	?!%G||DM** $C#    ||D'u|EEH#'22G4            ' 
	? 
	? 
	?	? =*3zA ..tWE.RR??5'::::::::::::* ? ? ?$33tE{{33>?
	?s+   A7B 
DAC**
D4DDDc              #  x  K   |D ]}t          |t                    r?t          |          r|                    | |          E d{V  Ct	          ||           V  Vt          |d          rJ|j        dk    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.Nr7   z<lambda>r   r_   )	r[   UnboundMethodrS   r   BoundMethodr   r7   r   	arguments)r_   r   r,   attrs       r8   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v&& 49
+B 9& 49+>q+A+F&+P %dD11111







	 	r:   callernodes.Call | Proxyc              #    K   t          ||           }d}t          |t          j                  rHt          |j        t          j                  r)|                     |j        j        |          D ]}d}|V  	| j                            d|          D ]?}|t          u s|
                                s |                    ||          D ]}d}|V  	@|st          | ||          dS )z5Infer what a class instance is returning when called.FT__call__)r   r   r,   N)r   r[   r	   Callfunc	Attributer   attrnamerW   r   r   r   r   )r_   r   r,   rO   resr   s         r8   r   zBaseInstance.infer_call_result0  s      'w55 fej)) 	jeo.V.V 	}}V[%97CC  				 M**:w?? 	 	D{" $--// --fg>>  				  	L d67KKKK	L 	Lr:   r.   r   NTr,   r-   r<   )r   r   r,   r-   )
rJ   ri   rj   rk   r   r   rc   r   r   r   r=   r:   r8   r   r      s                 4? ? ? ? ?>    " NRL L L L L L Lr:   r   c                       e Zd ZU dZded<    ed           Zd fd	Zd
ed<   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 )Instancez-A special node representing a class instance.nodes.ClassDefrW   c                 4    t                                           S r<   )objectmodelInstanceModelr=   r:   r8   <lambda>zInstance.<lambda>N  s    1J1J1L1L r:   rX   nodes.ClassDef | Noner.   rY   c                J    t                                          |           d S r<   )superr`   )r_   rX   rI   s     r8   r`   zInstance.__init__P  s!    !!!!!r:   z!ClassVar[InferBinaryOp[Instance]]infer_binary_opr   c                    d                     | j                                        j        | j        j        t	          |                     S )Nz<Instance of {}.{} at 0x{}>)formatrW   rootr7   idr   s    r8   __repr__zInstance.__repr__U  s=    ,33M  %t}'92d88
 
 	
r:   c                ^    d| j                                         j         d| j         j         S )NzInstance of r3   )rW   r   r7   r   s    r8   __str__zInstance.__str__Z  s.    Ndm00227NN$-:LNNNr:   r/   c                b    	 | j                             dd           dS # t          $ r Y dS w xY w)Nr   Fr   T)rW   rc   r   r   s    r8   r   zInstance.callable]  sI    	M!!*E!BBB4& 	 	 	55	s     
..c                4    | j                                         S r<   )rW   qnamer   s    r8   pytypezInstance.pytyped  s    }""$$$r:   c                    dS r   r=   r   s    r8   r   zInstance.display_typeg  r   r:   Nr,   r-   c                    |pt                      }| |_        	 t          | t          |          }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.
        __len__T)r   	boundnoder   BOOL_SPECIAL_METHODr   r   )r_   r,   results      r8   r   zInstance.bool_valuej  s     /-// 	/6I7SSFF 78 	 	 	3D)WMM+^<   ttt 	 s3   0 A0AA0A*%A0)A**A0/A0c                   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__r1   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   r[   r   r   lenr   r   r   r   )r_   indexr,   new_contextmethods        r8   getitemzInstance.getitem  s    *7D99 	"!GdmmM7mCCTJJ"-E76"J"J"J&+.. 	 :w    v{$%%* 	"J   
 F,,T;??FFFr:   )rX   r   r.   rY   r   )r.   r/   r<   r   )rJ   ri   rj   rk   rl   r   r   r`   r   r   r   r   r   r   r   __classcell__rI   s   @r8   r   r   H  s        77 ))L)LMM" " " " " " 7666
 
 
 

O O O O   % % % %       4G G G G G G G G Gr:   r   c                  n    e Zd ZdZ ed           ZddZddZdd	ZdddZ	dddZ
d ZddZdddZd
S )r   z>A special node representing a method not bound to an instance.c                 4    t                                           S r<   )r   UnboundMethodModelr=   r:   r8   r   zUnboundMethod.<lambda>  s    1O1O1Q1Q r:   r.   r   c                    | j         j                            d          }d                    | j        j        | j         j        |                                t          |                     S )NTfuturez<{} {} of {} at 0x{})	rW   parentro   r   rI   rJ   r7   r   r   )r_   ro   s     r8   r   zUnboundMethod.__repr__  sV    $**$*77%,,N#T]%74
 
 	
r:   
Literal[0]c                    dS )Nr   r=   r   s    r8   implicit_parametersz!UnboundMethod.implicit_parameters  s    qr:   Literal[False]c                    dS NFr=   r   s    r8   is_boundzUnboundMethod.is_bound      ur:   Nr,   r-   c                    || j         v r| j                             |          gS | j                            ||          S r<   )r   rL   rW   rc   r_   r7   r,   s      r8   rc   zUnboundMethod.getattr  sD    4** 	:+2248899}$$T7333r:   c                    || j         v r(t          | j                             |          f          S | j                            ||          S r<   )r   iterrL   rW   r   r   s      r8   r   zUnboundMethod.igetattr  sM    4** 	A077==?@@@}%%dG444r:   c                   | j         j        dk    rc| j         j                            d                                          }|                    d          r|dk    r|                     ||          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__Tr   z	builtins.builtins.type)rW   r7   r   ro   r   
startswith_infer_builtin_newr   )r_   r   r,   r   s       r8   r   zUnboundMethod.infer_call_result  s     =* 	@M(..d.;;AACCE,, @/1I @..vw???}..vw???r:   r   
nodes.Callr   Qcollections.abc.Generator[nodes.Const | Instance | type[Uninferable], None, None]c              #    K   |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        }|t          j        |          V  d S |j	        
                    |j         d                   }|j         d                             |          D ]@}|t          u r|V  t          |t          j                  rt          |          V  t          d S )N   r   r1   )r   r   r[   r	   r\   r   r   rh   const_factoryextra_contextrz   r   r@   r   r   )r_   r   r,   r   inferred_argnode_contextrO   s          r8   r  z UnboundMethod._infer_builtin_new  sN      { 	Fv{a 
	E&+a.%+66 /A,#FKN$8$8$:$:DAAlEK88 /(.E )%00000,00Q@@A,,\,BB 	! 	!H;& (EN33 )x(((((  	! 	!r:   Literal[True]c                    dS r   r=   r_   r,   s     r8   r   zUnboundMethod.bool_value      tr:   r   )r.   r   r.   r   r<   r   )r   r  r,   r   r.   r  r,   r-   r.   r
  )rJ   ri   rj   rk   r   r   r   r   r   rc   r   r   r  r   r=   r:   r8   r   r     s        HH ))Q)QRR
 
 
 
      4 4 4 4 4
5 5 5 5 5
@ @ @(! ! ! !<      r:   r   c                  h     e Zd ZdZ ed           Z fdZddZddZ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.c                 4    t                                           S r<   )r   BoundMethodModelr=   r:   r8   r   zBoundMethod.<lambda>  s    1M1M1O1O r:   c                X    t                                          |           || _        d S r<   )r   r`   bound)r_   proxyr  rI   s      r8   r`   zBoundMethod.__init__  s&    


r:   r.   Literal[0, 1]c                     | j         dk    rdS dS )Nr   r   r  )r7   r   s    r8   r   zBoundMethod.implicit_parameters  s    9	! 	1qr:   r
  c                    dS r   r=   r   s    r8   r   zBoundMethod.is_bound  r  r:   c                   ddl m} 	 t          |j        d                                                 }n## t
          $ r}t                    |d}~ww xY w|j        j        dk    rdS |	                    d          sdS 	 t          |j        d                                                 }n## t
          $ r}t                    |d}~ww xY w|j        j        dk    rdS t          |j        t                    sdS 	 t          |j        d	                                                 }n## t
          $ r}t                    |d}~ww xY w|j        j        d
k    r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|	j        j        dk    r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|j        j        dk    r:t          |j        t                    r |
|j                                     |           |                    |j        |j        |j        |          } |            }|                    |j        |gg 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   )Passr1   Nr@   r   r  r\   r   Tuplec                V    g | ]%}t          |                                         &S )r1   )r   rh   )r6   eltr,   s     r8   
<listcomp>z4BoundMethod._infer_type_new_call.<locals>.<listcomp>(  s/    UUU3d399W9#=#=>>UUUr:   c              3  6   K   | ]}|j         j        d k    V  dS )r@   N)rI   rJ   )r6   bases     r8   r?   z3BoundMethod._infer_type_new_call.<locals>.<genexpr>+  s,      PPt~&*4PPPPPPr:   r   Dict)r7   lineno
col_offsetr   T)rK   bodyr   newstyle	metaclasskeywords)astroid.nodesr  r   r   rh   r   r   rI   rJ   is_subtype_ofr[   r   r   eltsrF   collectionsdefaultdictlistr}   appendr"  r#  postinitlocals)r_   r   r,   r  mcsr   r7   rK   inferred_basesr   
cls_localskeyr   clsemptys     `            r8   _infer_type_new_callz BoundMethod._infer_type_new_call  s    	'&&&&&	9v{1~++G+<<==CC 	9 	9 	9 111q8	9=!Z/ 	4  11 	4	9A,,W,==>>DD 	9 	9 	9 111q8	9>"g- 	4$*c** 	4	9Q--g->>??EE 	9 	9 	9 111q8	9?#w. 	4	9UUUU%*UUUNN 	9 	9 	9 111q8	9PPPPPPP 	4	9Q--g->>??EE 	9 	9 	9 111q8	9?#v- 	4 ,T22
+ 	4 	4JC=399W95566  = = =$W5551<==U[[[99::  = = =$W5551<= }%0 4Z	35O5O 439%,,U333 mm=(	  
 
 * 	 	
 	
 	
  

s   .8 
AAA.B4 4
C>CC.D5 5
E?EE+E? ?
F	FF>.G- -
H7HH#I,,
J6JJ#J44
K>KKNr,   r-   c                R   t          || j                  }| j        j        j        dk    r[| j        j        dk    rK| j        dk    r@t          |j                  dk    r(|                     ||          }|rt          |f          S t                      
                    ||          S )Nr@   typer      )r   r  rI   rJ   r7   r   r   r7  r   r   r   )r_   r   r,   new_clsrI   s       r8   r   zBoundMethod.infer_call_resultX  s    &w
;;J )Z7		(
6)		( 	Y&		( FK  A%			( //@@G (WJ'''ww((999r:   c                    dS r   r=   r  s     r8   r   zBoundMethod.bool_valueg  r  r:   )r.   r  )r.   r
  r<   r   r  )rJ   ri   rj   rk   r   r   r`   r   r   r7  r   r   r   r   s   @r8   r   r     s        DD ))O)OPP          Y Y Yv: : : : : : :        r:   r   c                       e Zd ZU dZded<    eej                  Z	 dd fdZ	e
j        d             ZddZddZddZdddZddZddZ xZS )r]   zeA special node representing a generator.

    Proxied class is set once for all in raw_building.
    r   rW   Ngenerator_initial_contextr-   c                ~    t                                                       || _        t          |          | _        d S r<   )r   r`   r   r   _call_context)r_   r   r>  rI   s      r8   r`   zGenerator.__init__u  s9     	)*CDDr:   c              #  T   K   | j                             | j                  E d {V  d S r<   )r   infer_yield_resultr@  r   s    r8   infer_yield_typeszGenerator.infer_yield_types|  s7      ;11$2DEEEEEEEEEEEr:   r.   r   c                    dS r   r=   r   s    r8   r   zGenerator.callable  r   r:   Literal['builtins.generator']c                    dS )Nzbuiltins.generatorr=   r   s    r8   r   zGenerator.pytype  s    ##r:   r   c                    dS )Nr]   r=   r   s    r8   r   zGenerator.display_type      {r:   r,   r
  c                    dS r   r=   r  s     r8   r   zGenerator.bool_value  r  r:   c                R    d| j         j         d| j         dt          |            dS )Nz<Generator() l. at 0x>rW   r7   r"  r   r   s    r8   r   zGenerator.__repr__  0    ST]/SST[SS4SSSSr:   c                "    d| j         j         dS )Nz
Generator()rW   r7   r   s    r8   r   zGenerator.__str__      1DM.1111r:   )NN)r>  r-   r  )r.   rE  r   r<   r  )rJ   ri   rj   rk   rl   r   r   GeneratorModelr   r`   r   cachedrC  r   r   r   r   r   r   r   r   s   @r8   r]   r]   k  s          
 ()CDD QUE E E E E E E F F F   $ $ $ $       T T T T2 2 2 2 2 2 2 2r:   r]   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    r8   r   zAsyncGenerator.pytype  s    ))r:   r   c                    dS )NrW  r=   r   s    r8   r   zAsyncGenerator.display_type  s    r:   c                R    d| j         j         d| j         dt          |            dS )Nz<AsyncGenerator(rK  rL  rM  rN  r   s    r8   r   zAsyncGenerator.__repr__  s1    X$-"4XX$+XXRPTXXXXXXr:   c                "    d| j         j         dS )NzAsyncGenerator(rQ  rR  r   s    r8   r   zAsyncGenerator.__str__  s    6!36666r:   N)r.   rX  r   )rJ   ri   rj   rk   r   r   r   r   r=   r:   r8   rW  rW    sn        77* * * *       Y Y Y Y7 7 7 7 7 7r:   rW  c                  f     e Zd ZU dZded<   	 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 )r^   zoSpecial node representing new style typing unions.

    Proxied class is set once for all in raw_building.
    r   rW   Nleft(UnionType | nodes.ClassDef | nodes.Constrightr   nodes.NodeNG | Noner.   rY   c                r    t                                                       || _        || _        || _        d S r<   )r   r`   r   r^  r`  )r_   r^  r`  r   rI   s       r8   r`   zUnionType.__init__  s4     		


r:   r   c                    dS r   r=   r   s    r8   r   zUnionType.callable  r   r:   r,   r-   r
  c                    dS r   r=   r  s     r8   r   zUnionType.bool_value  r  r:   Literal['types.UnionType']c                    dS )Nztypes.UnionTyper=   r   s    r8   r   zUnionType.pytype  s      r:   r   c                    dS )Nr^   r=   r   s    r8   r   zUnionType.display_type  rH  r:   c                R    d| j         j         d| j         dt          |            dS )Nz<UnionType(rK  rL  rM  rN  r   s    r8   r   zUnionType.__repr__  rO  r:   c                "    d| j         j         dS )Nz
UnionType(rQ  rR  r   s    r8   r   zUnionType.__str__  rS  r:   r<   )r^  r_  r`  r_  r   ra  r.   rY   r  r  )r.   re  r   )rJ   ri   rj   rk   rl   r`   r   r   r   r   r   r   r   r   s   @r8   r^   r^     s          
  '+		 	 	 	 	 	 	       ! ! ! !   T T T T2 2 2 2 2 2 2 2r:   r^   r<   )r,   r-   r.   r/   )rm   rn   r,   r-   ro   rp   r.   rq   ):rk   
__future__r   r+  collections.abcsysr   typingr   r   r   astroidr   r	   astroid.constr
   astroid.contextr   r   r   r   astroid.exceptionsr   r   r   r   astroid.typingr   r   r   astroid.utilr   r   r   version_infor   typing_extensionsastroid.constraintr   r   r   r   r   BUILTINSrD   addrG   rS   rU   r   r   r   r   r   r   r]   rW  r^   r=   r:   r8   <module>ry     s  
  # " " " " "         



 $ $ $ $ $ $ / / / / / / / / / / % % % % % % % % $ $ $ $ $ $                       N M M M M M M M M M B B B B B B B B B Bv *)))))) .------k344
+i
 
 
+i
 
  ! !#9:
 $NN?###       8& & & & & & & &X -12
 2
 2
 2
 2
j  ,hL hL hL hL hL5 hL hL hLVMG MG MG MG MG| MG MG MG`O O O O OE O O Od~ ~ ~ ~ ~- ~ ~ ~B%2 %2 %2 %2 %2 %2 %2 %2P7 7 7 7 7Y 7 7 7 #2 #2 #2 #2 #2 #2 #2 #2 #2 #2r:   