+
    i2              
         R t ^ RIHt ^ RIt^ RIHtHtHt ^ RIH	t	 ^ RI
HtHtHtHt ^ RIHtHtHtHtHt ^ RIHt ^ RIHt ^ R	IHtHtHtHtHt ^ R
IH t  ^ RI!H"t" ^ RI#H$t$ ^ RI%H&t&H't'H(t( ]'       d   ^ RI)H*t* ]PV                  ]PX                  ,          ]PZ                  ,          ]P\                  ,          t/]0]1,          ]0]2,          ,          ]0]3,          ,          ]0]4,          ,          t5]Pl                  ]Pn                  ,          ]Pp                  ,          ]PV                  ,          t9Rt:Rt;Rt<R R lt=R t>R t?R t@R R ltAR R ltBR R ltCR R ltDR R  ltE]	! ]E]P                  ]Pn                  ]Pp                  ]PV                  ]PX                  ]PZ                  ]P\                  3]1R!7      tG]	! ]E]Pn                  ]P                  ]Pp                  ]PV                  ]PX                  ]PZ                  ]P\                  3]2R!7      tH]	! ]E]Pp                  ]Pn                  ]P                  ]PV                  ]PZ                  3]3R!7      tI]	! ]E]PV                  ]Pn                  ]P                  ]Pp                  ]PV                  ]PZ                  3]4R!7      tJR" tKRNR# R$ lltLRNR% R& lltMR' tNRNR( R) lltORNR* R+ lltPRNR, R- lltQRNR. R/ lltRRNR0 R1 lltSRNR2 R3 lltTRNR4 R5 lltURNR6 R7 lltVR8 R9 ltWRNR: R; lltXRNR< R= lltYRNR> R? lltZRNR@ RA llt[RNRB RC llt\RNRD RE llt]RNRF RG llt^RH RI lt_RNRJ RK llt`RL RM ltaR# )Oz#Astroid hooks for various builtins.)annotationsN)CallableIterableIterator)partial)TYPE_CHECKINGAnyNoReturncast)	argumentshelpersnodesobjectsutil)AstroidBuilder)InferenceContext)AstroidTypeErrorAttributeInferenceErrorInferenceErrorMroErrorUseInferenceDefault)inference_tip)AstroidManager)scoped_nodes)ConstFactoryResultInferenceResultSuccessfulInferenceResult)Instancezobject.__new__a  
class whatever(object):
    def join(self, iterable):
        return {rvalue}
    def replace(self, old, new, count=None):
        return {rvalue}
    def format(self, *args, **kwargs):
        return {rvalue}
    def encode(self, encoding='ascii', errors=None):
        return b''
    def decode(self, encoding='ascii', errors=None):
        return u''
    def capitalize(self):
        return {rvalue}
    def title(self):
        return {rvalue}
    def lower(self):
        return {rvalue}
    def upper(self):
        return {rvalue}
    def swapcase(self):
        return {rvalue}
    def index(self, sub, start=None, end=None):
        return 0
    def find(self, sub, start=None, end=None):
        return 0
    def count(self, sub, start=None, end=None):
        return 0
    def strip(self, chars=None):
        return {rvalue}
    def lstrip(self, chars=None):
        return {rvalue}
    def rstrip(self, chars=None):
        return {rvalue}
    def rjust(self, width, fillchar=None):
        return {rvalue}
    def center(self, width, fillchar=None):
        return {rvalue}
    def ljust(self, width, fillchar=None):
        return {rvalue}
a  
class whatever(object):
    def join(self, iterable):
        return {rvalue}
    def replace(self, old, new, count=None):
        return {rvalue}
    def decode(self, encoding='ascii', errors=None):
        return u''
    def capitalize(self):
        return {rvalue}
    def title(self):
        return {rvalue}
    def lower(self):
        return {rvalue}
    def upper(self):
        return {rvalue}
    def swapcase(self):
        return {rvalue}
    def index(self, sub, start=None, end=None):
        return 0
    def find(self, sub, start=None, end=None):
        return 0
    def count(self, sub, start=None, end=None):
        return 0
    def strip(self, chars=None):
        return {rvalue}
    def lstrip(self, chars=None):
        return {rvalue}
    def rstrip(self, chars=None):
        return {rvalue}
    def rjust(self, width, fillchar=None):
        return {rvalue}
    def center(self, width, fillchar=None):
        return {rvalue}
    def ljust(self, width, fillchar=None):
        return {rvalue}
c                   V ^8  d   QhRR/# )   returnr	    )formats   "G/usr/lib/python3/dist-packages/astroid/brain/brain_builtin_inference.py__annotate__r$      s        h      c                     \        4       hN)r   r!   r%   r#   _use_defaultr(      s    

r%   c                T   VP                  VR7      p\        \        4       4      P                  V4      R,          pVP	                  4        FX  pWn        RVn        RVn        RVP                  9   d   V .VP                  R&   V.V P                  VP                  &   Wn        KZ  	  R# )z-Function to extend builtin str/unicode class.)rvaluewhateverN	__class__)
r"   r   r   string_build	mymethodsparentlineno
col_offsetlocalsname)
class_nodecoder*   fakemethods   &&&  r#   _extend_string_classr8      s    ;;f;%D.*+88>zJD.."" &--'*4FMM+&*0
&++&" #r%   c                |    \        4       P                  pV P                  4        F  w  r#V! W,          4       K  	  R # r'   )r   builtins_moduleitems)class_transformsbuiltin_ast
class_name	transforms   &   r#   _extend_builtinsr@      s1     "22K!1!7!7!9
+)* ":r%   c                 t    \        R\        \        \        RR7      R\        \        \        RR7      /4       R# )z"Called by astroid_bootstrapping().byteszb'')r5   r*   strz''N)r@   r   r8   BYTES_CLASS	STR_CLASSr!   r%   r#   on_bootstraprF      s-    W1ER7/iM	
r%   c                   V ^8  d   QhRR/# r   r    boolr!   )r"   s   "r#   r$   r$      s      T r%   c                   VR 8X  Ed   V P                  4       P                  R8X  d   \        V P                  \        P
                  4      '       d   V P                  P                  R 8X  d   \        V P                  \        P                  4      '       d   \        V P                  P                  4      ^8X  dj   \        V P                  P                  ^ ,          \        P                  4      '       d/   V P                  P                  ^ ,          P                  R9   d   R# \        V P                  \        P
                  4      '       d   V P                  P                  V8H  # \        V P                  \        P                  4      '       d{   V P                  P                  R8H  ;'       dZ    \        V P                  P                  \        P
                  4      ;'       d$    V P                  P                  P                  R8H  # R# )typereFfromkeysdict>   MatchPattern)rootr3   
isinstancefuncr   Namer/   Assignlentargets
AssignName	Attributeattrnameexpr)nodebuiltin_names   &&r#   _builtin_filter_predicater^      sO    	IIK$tyy%**--IINNf$t{{ELL11##$)t{{**1-u/?/?@@KK"''+?? $))UZZ((yy~~--$))U__--II*, . .499>>5::6. .		##v-	

 r%   c                    V ^8  d   QhRRRR/# r   managerr   r    Noner!   )r"   s   "r#   r$   r$      s         	 r%   c           	        a RR V3R lllpV P                  \        P                  \        V4      \	        \
        VR7      4       R# )zRegister a new transform function for the given *builtin_name*.

The transform function must accept two parameters, a node and
an optional context.
Nc               (    V ^8  d   QhRRRRRRRR/# )	r   r\   
nodes.CallcontextInferenceContext | Nonekwargsr   r    r   r!   )r"   s   "r#   r$   0register_builtin_transform.<locals>.__annotate__   s,      #:MP	r%   c                  < S! WR 7      pV'       di   VP                   '       g   Wn         VP                  f   V P                  Vn        \        VR4      '       d    VP                  f   V P                  Vn        \	        V.4      # )rf   r1   )r/   r0   hasattrr1   iter)r\   rf   rh   resultr?   s   &&, r#   _transform_wrapper6register_builtin_transform.<locals>._transform_wrapper   si     41=== !%}}$ $ v|,,1B1B1J$(OO!VH~r%   )r]   r'   )register_transformr   Callr   r   r^   )ra   r?   r]   ro   s   &f& r#   register_builtin_transformrs      s8     & 

())Er%   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   r\   re   rf   rg   	node_typetype[nodes.BaseContainer]r?   zACallable[[SuccessfulInferenceResult], nodes.BaseContainer | None]r    nodes.BaseContainerr!   )r"   s   "r#   r$   r$      s;      
$ ) Q	
 r%   c                L   V P                   pV'       g@   V! V P                  V P                  V P                  V P                  V P
                  R 7      # \        V P                   4      ^8  d   \        4       hVw  pV! V4      pV'       gK    \        VP                  VR7      4      p\        T\        P                  4      '       d   \        hT! T4      pV'       d!   \        V\        P                  4      '       d   \        hV#   \        \        3 d   p\        ThRp?ii ; i)r0   r1   r/   
end_linenoend_col_offsetrk   N)argsr0   r1   r/   rz   r{   rV   r   nextinferr   StopIterationrR   r   UninferableBase)	r\   rf   ru   r?   r|   argtransformedinferredexcs	   &&&&     r#   _container_generic_inferencer      s     99D;;;;..
 	
 499~!##FSC.K	/CIIgI67H h 4 455%%)*[$2F2FGG!! . 	/%3.	/s   D D#DD#c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   r   r   rf   rg   klassrv   	iterablesz>tuple[type[nodes.BaseContainer] | type[ContainerObjects], ...]
build_eltsBuiltContainersr    znodes.BaseContainer | Noner!   )r"   s   "r#   r$   r$     sE     %6 %6	"%6$%6 %%6 N	%6
  %6  %6r%   c                l   \        W4      '       d   V # \        W4      '       Ed   \        \        P                  \        ,          V 4      p \
        ;QJ d&    R  V P                   4       F  '       d   K   RM	  RM! R  V P                   4       4      '       d@   V P                   Uu. uF'  p\        \        P                  V4      P                  NK)  	  ppEM<. pV P                   FV  pV'       g   K  \        P                  ! WqR7      pV'       g   K.  \        P                  ! WxR7      p	VP                  V	4       KX  	  M\        V \        P                  4      '       d_   V P                   U
u. uFG  p
\        V
^ ,          \        P                  4      '       d   V
^ ,          P                  M	\        4       NKI  	  pp
MU\        V \        P                  4      '       d4   \        V P                  \         \"        34      '       d   V P                  pMR# VP%                  V! V4      R7      # u upi u up
i )c              3  V   "   T F  p\        V\        P                  4      x  K!  	  R # 5ir'   )rR   r   Const).0elts   & r#   	<genexpr>/_container_generic_transform.<locals>.<genexpr>  s     @xz#u{{++xs   ')FTrk   )originalvalueN)elts)rR   r
   r   BaseContainerContainerObjectsallr   r   r   r   
safe_inferEvaluatedObjectappendDictr;   r(   rC   rB   from_elements)r   rf   r   r   r   r   r   elementr   evaluated_objectitems   &&&&&      r#   _container_generic_transformr     s    #
#!!E''*::SA3@sxx@333@sxx@@@<?HHEHSDc*00HDED D88??7D8','<'<!(($ KK 01 $ 
C	$	$ 		
! (Q==DGMM<>Q! 	 
 
C	%	%*SYYe*M*MyyJt$455/ F
s   '-H,/AH1c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   r\   re   rf   rg   r   rv   r   z7tuple[type[nodes.NodeNG] | type[ContainerObjects], ...]r   r   r    rw   r!   )r"   s   "r#   r$   r$   ,  sM     N N
N$N %N G	N
  N Nr%   c                B    \        \        VVVVR 7      p\        WW%4      # ))rf   r   r   r   )r   r   r   )r\   rf   r   r   r   transform_funcs   &&&&& r#   _infer_builtin_containerr   ,  s,     $N (uMMr%   )r   r   r   c                   R  R lp \        V P                  V4      4      p\        T\        P                  4      '       d   TP                  pT# T! T4      '       d   . pTP                   F  pT! T4      '       g   \	        4       h\        TP                  4      ^8w  d   \	        4       h\        TP                  ^ ,          \        P                  \        P                  \        P                  34      '       g   \	        4       hTP                  \        TP                  4      4       K  	  T# \	        4       h  \        \        3 d   p\        ThRp?ii ; i)c                   V ^8  d   QhRR/# rH   r!   )r"   s   "r#   r$   _get_elts.<locals>.__annotate__k  s     C C$ Cr%   c                t    \        V \        P                  \        P                  \        P                  34      # r'   )rR   r   ListTupleSet)ns   &r#   is_iterable_get_elts.<locals>.is_iterablek  s"    !ejj%++uyyABBr%   N)r}   r~   r   r   r   rR   r   r   r;   r   rV   r   r   rT   r   tuple)r   rf   r   r   r   r;   r   s   &&     r#   	_get_eltsr   j  s   C+		'*+ (EJJ''" L! 
X		==C
 s##)++388}!)++chhqkEKKejj+QRR)++LLsxx) ! L "##' M* +!s*+s   D9 9E
EEc               $    V ^8  d   QhRRRRRR/# )r   r\   re   rf   rg   r    
nodes.Dictr!   )r"   s   "r#   r$   r$     s"     3 3Z 3*A 3Z 3r%   c                (   \         P                  P                  WR7      pVP                  4       '       g   VP	                  4       '       d   \
        hVP                  p\        VP                  P                  4       4      pV'       gV   V'       gN   \        P                  ! V P                  V P                  V P                  V P                  V P                   R7      # V'       d5   V'       g-   V UUu. uF  w  rV\        P"                  ! V4      V3NK  	  pppM\%        V4      ^8X  dP   V'       dH   \'        V^ ,          V4      pV UUu. uF  w  rV\        P"                  ! V4      V3NK  	  p	ppW,           pM.\%        V4      ^8X  d   \'        V^ ,          V4      pM
\        4       h\        P                  ! V P                  V P                  V P                  V P                  V P                   R7      pVP)                  V4       V# u uppi u uppi )a  Try to infer a dict call to a Dict node.

The function treats the following cases:

    * dict()
    * dict(mapping)
    * dict(iterable)
    * dict(iterable, **kwargs)
    * dict(mapping, **kwargs)
    * dict(**kwargs)

If a case can't be inferred, we'll fallback to default inference.
rk   ry   r1   r0   r/   rz   r{   )r   CallSite	from_callhas_invalid_argumentshas_invalid_keywordsr   positional_argumentslistkeyword_argumentsr;   r   r   r0   r1   r/   rz   r{   r   rV   r   postinit)
r\   rf   callr|   rh   keyr   r;   r   keyss
   &&        r#   
infer_dictr     s    '''>D!!##t'@'@'B'B!!$$D$((..01F zz;;;;..
 	
 d=CDVzs%++c"E*VD	TaFa'*<BCFjcS!5)FC	Ta$q'7+!##JJ??{{{{??**E 
NN5L% E Ds   4#H#Hc               $    V ^8  d   QhRRRRRR/# )r   r\   re   rf   rg   r    zobjects.Superr!   )r"   s   "r#   r$   r$     s$     = =
=6==r%   c                   \        V P                  4      ^8X  d   \        hV P                  4       p\	        V\
        P                  4      '       g   \        hVP                  R9  d   \        h\        P                  ! V4      pVf   Q hV P                  '       g(   TpVP                  R8X  d   TpMkVP                  4       pMZ \        V P                  ^ ,          P                  VR7      4      p \        T P                  ^,          P                  TR7      4      p\	        V\        P                   4      '       g!   \	        V\        P                   4      '       d   \        h\"        P$                  ! VVVVV R7      pWn        V#   \        \        3 d   p\        ThRp?ii ; i  \        \        3 d   p\        ThRp?ii ; i)ad  Understand super calls.

There are some restrictions for what can be understood:

    * unbounded super (one argument form) is not understood.

    * if the super call is not inside a function (classmethod or method),
      then the default inference will be used.

    * if the super arguments can't be inferred, the default inference
      will be used.
classmethodNrk   )mro_pointermro_type
self_classscoper   )r   r7   )rV   r|   r   r   rR   r   FunctionDefrK   r   get_wrapping_classinstantiate_classr}   r~   r   r   r   r   r   Superr/   )r\   rf   r   clsr   r   r   	super_objs   &&      r#   infer_superr     s    499~!!JJLEeU..//!!zz22!!

)
)%
0C??999 ::&H,,.H	/tyy|11'1BCK	/DIIaL..w.?@H +t3344
$&&9 9 "!I + . 	/%3.	/ . 	/%3.	/s0   ,F 1,F& F#FF#&G7F>>Gc                   \        V P                  4      R9  d   \        h \        V P                  ^ ,          P	                  VR7      4      p\        V P                  ^,          P	                  VR7      4      p\        T\        P                  4      '       g!   \        T\        P                  4      '       d!   \        P                  \        P                  3# \        T\        P                  4      ;'       d    \        TP                  \        4      pT'       g   \        hY#P                  3#   \
        \        3 d   p\        ThRp?ii ; i)r   rk   N)r      )rV   r|   r   r}   r~   r   r   rR   r   r   Uninferabler   r   r   rC   )r\   rf   objattrr   	is_strings   &&    r#   _infer_getattr_argsr     s    
499~V#!!+499Q<%%g%67DIIaL&&w&78 #t++,,
4AUAU0V0V !1!1114-MM*TZZ2MI!!

? M* +!s*+s   AD1 1EE		Ec                   V ^8  d   QhRR/# r   rf   rg   r!   )r"   s   "r#   r$   r$     s      !8 r%   c                ,   \        W4      w  r#\        V\        P                  4      '       g3   \        V\        P                  4      '       g   \	        VR4      '       g   \        P
                  #  \        VP                  W1R7      4      #   \        \        \        3 dr    \        T P                  4      ^8X  dP    \        T P                  ^,          P                  TR7      4      u #   \        \        3 d   p\        ThRp?ii ; i \        hi ; i)zUnderstand getattr calls.

If one of the arguments is an Uninferable object, then the
result will be an Uninferable object. Otherwise, the normal attribute
lookup will be done.
igetattrrk   N)r   rR   r   r   rl   r   r}   r   r   r   r   rV   r|   r~   r   )r\   rf   r   r   r   s   &&   r#   infer_getattrr     s     $D2IC3,,--dD0011sJ''3CLLL788>+BC 3tyy>Q3DIIaL..w.?@@!>2 3)s23	  3s6   1B 0D=+C+(D+D<DDDDc                   V ^8  d   QhRR/# r   r!   )r"   s   "r#   r$   r$   1  s      !8 r%   c                    \        W4      w  r#\        V\        P                  4      '       g3   \        V\        P                  4      '       g   \	        VR4      '       g   \        P
                  # VP                  W1R7       \        P                  ! R4      #   \         d    \        P
                  u # \         d    \        P                  ! R4      u # i ; i)a5  Understand hasattr calls.

This always guarantees three possible outcomes for calling
hasattr: Const(False) when we are sure that the object
doesn't have the intended attribute, Const(True) when
we know that the object has the attribute and Uninferable
when we are unsure of the outcome of the function call.
getattrrk   FT)r   rR   r   r   rl   r   r   r   r   r   r   )r\   rf   r   r   s   &&  r#   infer_hasattrr   1  s    "'6	sD0011$ 4 4553	**###D* ;;t   " "{{5!!"s$   A.B 1B C6C?CCc                   V ^8  d   QhRR/# r   r!   )r"   s   "r#   r$   r$   L  s     , ,"9 ,r%   c                   \        V P                  4      ^8w  d   \        hV P                  ^ ,          p \        VP	                  VR7      4      p\        T\        P                  4      '       d   \        P                  # \        P                  ! TP                  4       4      #   \
        \        3 d    \        P                  u # i ; i)zUnderstand callable calls.

This follows Python's semantics, where an object
is callable if it provides an attribute __call__,
even though that attribute is something which can't be
called.
rk   )rV   r|   r   r}   r~   r   r   r   r   rR   r   r   r   callable)r\   rf   argumentr   s   &&  r#   infer_callabler   L  s     499~!!yy|H w78 (D0011;;x((*++	 M*   s   B$ $!CCc               $    V ^8  d   QhRRRRRR/# )r   r\   re   rf   rg   r    zobjects.Propertyr!   )r"   s   "r#   r$   r$   b  s$     % %
%6%%r%   c           	        \        V P                  4      ^8  d   \        hV P                  ^ ,          p \        VP	                  VR7      4      p\        T\        P                  \        P                  34      '       g   \        h\        P                  ! TRT P                  T P                  \        P                   R7      pTP#                  . TP                  \%        TRR4      R7       T#   \
        \        3 d   p\        ThRp?ii ; i)zlUnderstand `property` class.

This only infers the output of `property`
call, not the arguments themselves.
rk   Nz
<property>)functionr3   r0   r1   r/   doc_node)bodyr|   r   )rV   r|   r   r}   r~   r   r   rR   r   r   Lambdar   Propertyr0   r1   r   SYNTHETIC_ROOTr   r   )r\   rf   getterr   r   	prop_funcs   &&    r#   infer_propertyr   b  s     499~!!YYq\F+W56 h!2!2ELL ABB!!  {{??
 **
I ]]:t4  
 - M* +!s*+s   C. .D?DDc                   V ^8  d   QhRR/# r   r!   )r"   s   "r#   r$   r$     s     # #5 #r%   c                N   \        V P                  4      ^8  d   \        hV P                  '       g   \        P                  ! R4      # V P                  ^ ,          p \        VP                  VR7      4      p\        T\        P                  4      '       d   \        P                  # TP                  TR7      p\        T\        P                  4      '       d   \        P                  # \        P                  ! T4      #   \        \        3 d    \        P                  u # i ; i)zUnderstand bool calls.Frk   )rV   r|   r   r   r   r}   r~   r   r   r   r   rR   r   
bool_value)r\   rf   r   r   r   s   &&   r#   
infer_boolr     s    
499~!!999{{5!!yy|H w78 (D0011$$W$5J*d2233;;z"" M*   s   D   !D$#D$c                   V ^8  d   QhRR/# r   r!   )r"   s   "r#   r$   r$     s     6 65 6r%   c                    \        V P                  4      ^8w  d   \        h\        P                  ! V P                  ^ ,          V4      # )z+Understand the one-argument form of *type*.)rV   r|   r   r   object_type)r\   rf   s   &&r#   
infer_typer     s3    
499~!!tyy|W55r%   c                   V ^8  d   QhRR/# r   r!   )r"   s   "r#   r$   r$     s      6 r%   c                   V P                   p^ \        V4      u;8  d   ^8:  g    \        h \        h\        \        P
                  VR7      pV Uu. uF
  qC! V4      NK  	  ppV F  pV'       d!   \        V\        P                  4      '       d   \        h\        V\        P                  4      '       g   \        h\        VP                  \        R4      \        34      '       d   K  \        h	  \        V4      ^8  d*   VP                  R.^\        V4      ,
          ,          4       \        P                  ! V P                  V P                   V P"                  V P$                  V P&                  R7      pVP(                  ! V!   V# u upi )zUnderstand `slice` calls.rk   Nry   )r|   rV   r   r   r   r   rR   r   r   r   r   rK   intextendSlicer0   r1   r/   rz   r{   r   )r\   rf   r|   
infer_funcr   
slice_nodes   &&    r#   infer_slicer     s'   99Ds4yA!! !!':J'+,tJsOtD,jd&:&:;;%%#u{{++%%#))d4j#%677%%  4y1}TFa#d)m,-{{??{{??**J + -s   F
c               (    V ^8  d   QhRRRRRRRR/# )	r   r\   znodes.ClassDefrf   rg   rh   r   r    zIterator[Instance]r!   )r"   s   "r#   r$   r$     s,     - -
-#:-MP--r%   c                6    \        V P                  4       34      # r'   )rm   r   )r\   rf   rh   s   &&,r#   _infer_object__new__decoratorr    s    
 '')+,,r%   c                   V ^8  d   QhRR/# rH   r!   )r"   s   "r#   r$   r$     s       r%   c                    V P                   '       g   R# V P                   P                   FA  p\        V\        P                  4      '       g   K%  VP	                  4       \
        8X  g   K@   R# 	  R# )z^Predicate before inference_tip.

Check if the given ClassDef has an @object.__new__ decorator
FT)
decoratorsr   rR   rY   	as_stringOBJECT_DUNDER_NEW)r\   	decorators   & r#   #_infer_object__new__decorator_checkr    sO    
 ???__**	i11""$(99 + r%   c                   V ^8  d   QhRR/# r   r!   )r"   s   "r#   r$   r$     s     *( *((? *(r%   c                >   \         P                  P                  WR7      pVP                  '       d   \	        R4      h\        VP                  4      ^8w  d"   \	        R\        VP                  4       24      hVP                  w  r4 \        VP                  VR7      4      p\        T\        P                  4      '       g   \	        R\        T4      : 24      h \        P                   ! YAR7      p \        P"                  ! YWT4      p\        P*                  ! T4      #   \        \        3 d   p\        ThRp?ii ; i  \         d   p\        ThRp?ii ; i  \$         d"   p\	        R\'        T4      ,           4      ThRp?i\(         d   p\        ThRp?ii ; i)a  Infer issubclass() calls.

:param nodes.Call callnode: an `issubclass` call
:param InferenceContext context: the context for the inference
:rtype nodes.Const: Boolean Const value of the `issubclass` call
:raises UseInferenceDefault: If the node cannot be inferred
rk   z2TypeError: issubclass() takes no keyword argumentsExpected two arguments, got Nz$TypeError: arg 1 must be class, not TypeError: )r   r   r   r   r   rV   r   r}   r~   r   r   rR   r   ClassDefrK   r   class_or_tuple_to_containerobject_issubclassr   rC   r   r   )	callnoderf   r   obj_nodeclass_or_tuple_nodeobj_typer   class_containerissubclass_bools	   &&       r#   infer_issubclassr    su    '''BD!"VWW
4$$%*!*3t/H/H+I*JK
 	
 %)$=$=!H+w78 h//!24>2DE
 	
+!==

+!33HwW
 ;;''+ M* +!s*+  +!s*+  E!-#c(":;D +!s*+sZ   D! E 4E !D>2D99D>EEEF&FFFFFc               $    V ^8  d   QhRRRRRR/# )r   r  re   rf   rg   r    nodes.Constr!   )r"   s   "r#   r$   r$     s$     "( "("(#:"("(r%   c                   \         P                  P                  WR7      pVP                  '       d   \	        R4      h\        VP                  4      ^8w  d"   \	        R\        VP                  4       24      hVP                  w  r4 \        P                  ! WAR7      p \        P                  ! Y5T4      p\        T\        P                   4      '       d   \        h\"        P$                  ! T4      #   \         d   p\        ThRp?ii ; i  \         d"   p\	        R\        T4      ,           4      ThRp?i\         d   p\        ThRp?ii ; i)zInfer isinstance calls.

:param nodes.Call callnode: an isinstance call
:raises UseInferenceDefault: If the node cannot be inferred
rk   z2TypeError: isinstance() takes no keyword argumentsr  Nr  )r   r   r   r   r   rV   r   r   r  r   object_isinstancer   rC   r   rR   r   r   r   r   )r  rf   r   r  r  r  r   isinstance_bools   &&      r#   infer_isinstancer    s'    '''BD!"VWW
4$$%*!*3t/H/H+I*JK
 	
 %)$=$=!H+!==

+!33HwW
 /4#7#788!!;;''  +!s*+  E!-#c(":;D +!s*+sB   C3  D 3D
>DD
ED44EEE		Ec                    V ^8  d   QhRRRR/# r   rf   rg   r    r  r!   )r"   s   "r#   r$   r$   1  s     5 54 5 5r%   c                   \         P                  P                  WR7      pVP                  '       d   \	        R4      h\        VP                  4      ^8w  d/   \	        RP                  \        VP                  4      R7      4      hVP                  w  p \        P                  ! \        P                  ! W1R7      4      #   \        \        3 d   p\	        \        T4      4      ThRp?ii ; i)zInfer length calls.

:param nodes.Call node: len call to infer
:param context.InferenceContext: node context
:rtype nodes.Const: a Const node with the inferred length, if possible
rk   z/TypeError: len() must take no keyword argumentsz=TypeError: len() must take exactly one argument ({len}) given)rV   N)r   r   r   r   r   rV   r   r"   r   r   r   
object_lenr   r   rC   )r\   rf   r   argument_noder   s   &&   r#   	infer_lenr"  1  s     '''>D!"STT
4$$%*!"Fs4+D+D'EFF
 	
 //O]5{{7--mMNNn- 5!#c(+45s   *C   C+C&&C+c                    V ^8  d   QhRRRR/# r  r!   )r"   s   "r#   r$   r$   H  s     5 54 5 5r%   c                   \         P                  P                  WR7      pVP                  '       d   \	        R4      h \
        P                  ! R4      #   \        \        3 d   p\	        \        T4      4      ThRp?ii ; i)zInfer str() calls.

:param nodes.Call node: str() call to infer
:param context.InferenceContext: node context
:rtype nodes.Const: a Const containing an empty string
rk   z/TypeError: str() must take no keyword arguments N)
r   r   r   r   r   r   r   r   r   rC   )r\   rf   r   r   s   &&  r#   	infer_strr&  H  sn     '''>D!"STT5{{2n- 5!#c(+45s   A B &A;;B c                   V ^8  d   QhRR/# r   r!   )r"   s   "r#   r$   r$   X  s      4 r%   c                    \         P                  P                  WR7      pVP                  '       d   \	        R4      hVP
                  '       d    \        VP
                  ^ ,          P                  VR7      4      p\        T\        P                  4      '       d   \        h\        T\        P                  4      '       dS   \        TP                   \"        \        34      '       d-    \#        TP                   4      p\        P                  ! T4      # \        P                  ! ^ 4      #   \        \        3 d   p\	        \        T4      4      ThRp?ii ; i  \$         d    \        P                  ! ^ 4      u # i ; i)zInfer int() calls.

:param nodes.Call node: int() call to infer
:param context.InferenceContext: node context
:rtype nodes.Const: a Const containing the integer value of the int() call
rk   /TypeError: int() must take no keyword argumentsN)r   r   r   r   r   r   r}   r~   r   r   rC   rR   r   r   r   r   r   r   
ValueError)r\   rf   r   first_valuer   actual_values   &&    r#   	infer_intr-  X  s*    '''>D!"STT   	9t88;AA'ARSK k4#7#788%%k5;;//JSz5
 5
&";#4#45 ;;|,,;;q> . 	9%c#h/S8	9  &{{1~%&s*   ,D+ *E +E<EE!E=<E=c                   V ^8  d   QhRR/# r   r!   )r"   s   "r#   r$   r$   x  s     D) D)'> D)r%   c                  a  R V 3R llp\         P                  P                  S VR7      pVP                  '       d   \	        R4      h\        VP                  4      R9  d   \	        R4      h\        P                  ! R4      pVP                  ^ ,          p \        VP                  VR7      4      pT\        P                  J d	   T! . 4      # \        P                  3p\        T\        P                   \        P"                  \        P$                  34      '       dK   TP&                  pT F  p	\        Y4      '       d   K  T! . 4      u # 	  T U	u. uF  qT3NK  	  p
p	T! T
4      # \        T\        P                  4      '       d`   \        TP(                  \*        \,        34      '       d:   TP(                   U	u. uF  p	\        P                  ! T	4      T3NK  	  p
p	T! T
4      # \        T\        P.                  4      '       dO   TP1                  4       pT F  p\        Y4      '       d   K  T! . 4      u # 	  T U	u. uF  qT3NK  	  p
p	T! T
4      # T! . 4      #   \        \        3 d    T! . 4      u # i ; iu up	i u up	i u up	i )a?  Infer dict.fromkeys.

:param nodes.Call node: dict.fromkeys() call to infer
:param context.InferenceContext context: node context
:rtype nodes.Dict:
    a Dictionary containing the values that astroid was able to infer.
    In case the inference failed for any reason, an empty dictionary
    will be inferred instead.
c                    V ^8  d   QhRRRR/# )r   elementsr   r    r   r!   )r"   s   "r#   r$   )infer_dict_fromkeys.<locals>.__annotate__  s     	 	D 	Z 	r%   c                   < \         P                  ! SP                  SP                  SP                  SP
                  SP                  R 7      pVP                  V 4       V# )r   )r   r   r1   r0   r/   rz   r{   r   )r1  new_noder\   s   & r#   _build_dict_with_elements6infer_dict_fromkeys.<locals>._build_dict_with_elements  sK    ::;;;;..
 	(#r%   rk   r)  z5TypeError: Needs between 1 and 2 positional argumentsN>      r   )r   r   r   r   r   rV   r   r   r   r}   r~   r   r   r   r   rR   r   r   r   r   r   rC   rB   r   itered)r\   rf   r5  r   defaultvaluesinferred_valuesaccepted_iterable_elementsr1  r   elements_with_valuer   r   s   f&           r#   infer_dict_fromkeysr>  x  sO   	 	 ''g'>D!"STT
4$$%V3!C
 	
 kk$G&&q)F-v||G|<= $***(,, #(++/EJJ		5;;#GHH"''GgBB044  
 BJJg1J()<==/5;;//JU|5 5 <K;P;P
;PU[[!7+;P 	 
 ))<==/5::..%%'Cc>>044 
 BFFg1F()<== %R((E M* -(,,- K

 Gs$   I I==!J JI:9I:c               (    V ^8  d   QhRRRRRRRR/# )	r   r\   re   rf   rg   rh   r   r    zIterator[CopyResult]r!   )r"   s   "r#   r$   r$     s,      
6ILr%   c                   \        V P                  \        P                  4      '       g   Q h\        P
                  ! V P                  P                  P                  VR 7      4      w  r4\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d   \        \        \        ,          V4      # \        h)rk   c              3     "   T FM  p\        V\        P                  \        P                  \        P                  \
        P                  34      x  KO  	  R # 5ir'   )rR   r   r   r   r   r   	FrozenSet)r   inferred_nodes   & r#   r   %_infer_copy_method.<locals>.<genexpr>  sE       +M 	EJJ

EIIw?P?PQ	
 	
 +s   AAFT)rR   rS   r   rY   	itertoolsteer[   r~   r   r
   r   
CopyResultr   )r\   rf   rh   inferred_originferred_copys   &&,  r#   _infer_copy_methodrJ    s     dii1111#,==1E1Eg1E1V#W M
s  +	sss  +	   HZ(-88
r%   c                    V ^8  d   QhRRRR/# )r   r\   re   r    rI   r!   )r"   s   "r#   r$   r$     s     
K 
Kj 
KT 
Kr%   c                   \        V P                  \        P                  4      '       d   V P                  P                  R8X  g   R# \        V P                  P
                  \        P                  4      '       d,   \        P                  ! V P                  P
                  4      pMV P                  P
                  p\        V\        P                  4      ;'       d    \        VP                  \        4      # )zCatch calls to str.format().r"   F)rR   rS   r   rY   rZ   r[   rT   r   r   r   r   rC   )r\   r   s   & r#   _is_str_format_callrM    s    tyy%//22tyy7I7IX7U$))..%**--		/		eU[[)JJjc.JJr%   c               (    V ^8  d   QhRRRRRRRR/# )	r   r\   re   rf   rg   rh   r   r    z3Iterator[ConstFactoryResult | util.UninferableBase]r!   )r"   s   "r#   r$   r$     s,     39 39
39639IL39839r%   c                p   \         P                  P                  WR7      p\        V P                  \
        P                  \
        P                  \
        P                  34      '       g   Q h\        V P                  P                  \
        P                  4      '       dp   \        P                  ! V P                  P                  4      ;p'       d!   \        V\
        P                  4      '       g   \        \        P                  .4      # TpMe\        V P                  P                  \
        P                  4      '       d   V P                  P                  pM\        \        P                  .4      # VP                   p. pVP"                   Ff  p\        P                  ! W4      p	\        V	\
        P                  4      '       g   \        \        P                  .4      u # VP%                  V	4       Kh  	  V Uu. uF  qP                   NK  	  p
p/ pVP&                  P)                  4        F[  w  r\        P                  ! W4      p	\        V	\
        P                  4      '       g   \        \        P                  .4      u # WV&   K]  	  VP)                  4        UUu/ uF  w  rWP                   bK  	  ppp VP*                  ! V
/ VB p\        \
        P6                  ! T4      .4      # u upi u uppi   \,        \.        \0        \2        \4        3 d    \        \        P                  .4      u # i ; i)z?Return a Const node based on the template and passed arguments.rk   )r   r   r   rR   rS   r   rY   
AssignAttrDelAttrr[   rT   r   r   r   rm   r   r   r   r   r   r;   r"   AttributeError
IndexErrorKeyError	TypeErrorr*  const_factory)r\   rf   rh   r   r   r   format_templateinferred_positionalione_inferred
pos_valuesinferred_keywordkvkeyword_valuesformatted_strings   &&,             r#   _infer_str_format_callra    s^    '''>Ddii%//53C3CU]]!STTTT $))..%**--88X88U[[11))*++	DIINNEKK	0	0		T%%&''kkO .0&&q2,44))*++""<0	 ' /BB.AWW.AJB 02&&,,.q2,44))*++*	 / >N=S=S=U%V=UTQaj=UN%V(*11:PP $$%56788+ C &W J)ZH (
 T%%&''(s   <K- K2;K8 8:L54L5c                    V ^8  d   QhRRRR/# r`   r!   )r"   s   "r#   r$   r$     s     ( (n ( (r%   c                   \        V \        R 4       \        V \        R4       \        V \        R4       \        V \        R4       \        V \
        R4       \        V \        R4       \        V \        R4       \        V \        R4       \        V \        R4       \        V \        R	4       \        V \        R
4       \        V \        R4       \        V \        R4       \        V \        R4       \        V \        R4       \        V \         R4       \        V \"        R4       \        V \$        R4       \        V \&        R4       V P)                  \*        P,                  \/        \0        4      \2        4       V P)                  \*        P4                  \/        \6        4      R 4       V P)                  \*        P4                  \/        \8        4      \:        4       R# )rI   superr   propertyr   rl   r   setr   rN   	frozensetrK   slicerR   
issubclassrV   rC   r   zdict.fromkeysc                    \        V P                  \        P                  4      ;'       d    V P                  P                  R 8H  # )copy)rR   rS   r   rY   rZ   )r\   s   &r#   <lambda>register.<locals>.<lambda>2  s4    Z		5??; ) )II&()r%   N)rs   r   r   r   r   r   r   infer_tuple	infer_set
infer_listr   infer_frozensetr   r   r  r  r"  r&  r-  r>  rq   r   r  r   r  r  rr   rJ  ra  rM  )ra   s   &r#   registerrr    sT   w
F;wW=w
Cw
CwyAwyAwW=w	59w
F;w
F;wEw
F;wW=w(8,Gw(8,Gw	59w	59w	59w(;_M 34+ 

()	) 

,-r%   r'   )b__doc__
__future__r   rE  collections.abcr   r   r   	functoolsr   typingr   r   r	   r
   astroidr   r   r   r   r   astroid.builderr   astroid.contextr   astroid.exceptionsr   r   r   r   r   astroid.inference_tipr   astroid.managerr   astroid.nodesr   astroid.typingr   r   r   astroid.basesr   rB  	DictItemsDictKeys
DictValuesr   rK   r   r   rf  rg  r   r   r   r   rG  r  rE   rD   r(   r8   r@   rF   r^   rs   r   r   r   r   rn  rp  ro  rq  r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r"  r&  r-  r>  rJ  rM  ra  rr  r!   r%   r#   <module>r     s  
 * "  8 8  5 5 < < * ,  0 * &  & )))G,<,<<w?Q?QQ  u+T
*T#Y6iHZZ%**$uyy073D3DD
$ (	V$N #+< FB%6PN& 
++

		  
**		 
 
))zz5;;(9(97;K;KL		 


zz5;;		73D3DgFVFVW	:3l=@086,,%P#.6>-*(Z"(J5.5 @D)N 
K39l(r%   