§
    ñyIfá2  ã                  óH  — d Z ddl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 ddlmZ ddlmZmZmZmZ dd	lmZ dd
lmZ ddlmZmZ ddlmZm Z   ed¦  «        Z! G d„ dej"        ¦  «        Z# G d„ dej$        ¦  «        Z% G d„ dej&        ¦  «        Z' G d„ dej&        ¦  «        Z( G d„ dej)        ¦  «        Z* G d„ dej)        ¦  «        Z+ G d„ dej)        ¦  «        Z, G d„ dej-        ¦  «        Z.ej$        e(fej/        _0         G d„ dej-        ¦  «        Z1d S )!a"  
Inference objects are a way to represent composite AST nodes,
which are used only as inference results, so they can't be found in the
original AST tree. For instance, inferring the following frozenset use,
leads to an inferred FrozenSet:

    Call(func=Name('frozenset'), args=Tuple(...))
é    )Úannotations)Ú	GeneratorÚIterator)Úcached_property)ÚAnyÚLiteralÚNoReturnÚTypeVar)ÚbasesÚutil)ÚInferenceContext)ÚAttributeInferenceErrorÚInferenceErrorÚMroErrorÚ
SuperError)Úobjectmodel)ÚAstroidManager)Únode_classesÚscoped_nodes)ÚInferenceResultÚSuccessfulInferenceResultÚ_Tc                  ó:   — e Zd ZdZdd„Zddd
„Zed„ ¦   «         ZdS )Ú	FrozenSetz.Class representing a FrozenSet composite node.ÚreturnúLiteral['builtins.frozenset']c                ó   — dS )Nzbuiltins.frozenset© ©Úselfs    úC/var/www/piapp/venv/lib/python3.11/site-packages/astroid/objects.pyÚpytypezFrozenSet.pytype'   s   € Ø#Ð#ó    NÚcontextúInferenceContext | NoneÚkwargsr   c              +  ó   K  — | V — d S ©Nr   ©r    r$   r&   s      r!   Ú_inferzFrozenSet._infer*   ó   è è € Øˆ
ˆ
ˆ
ˆ
ˆ
r#   c                ó^   — t          ¦   «         j        }|                     d¦  «        d         S )NÚ	frozensetr   ©r   Úbuiltins_moduleÚgetattr©r    Úast_builtinss     r!   Ú_proxiedzFrozenSet._proxied-   s)   € å%Ñ'Ô'Ô7ˆØ×#Ò# KÑ0Ô0°Ô3Ð3r#   )r   r   r(   ©r$   r%   r&   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r"   r*   r   r3   r   r#   r!   r   r   $   sb   € € € € € Ø8Ð8ð$ð $ð $ð $ðð ð ð ð ð ð4ð 4ñ „_ð4ð 4ð 4r#   r   c                  ó¬   ‡ — e Zd ZdZ ej        ¦   «         Zd!ˆ fd„Zd"d#d„Zd„ Z	e
d„ ¦   «         Zd$d„Zd%d„Zed„ ¦   «         Zd&d„Z	 d"d'd„Zd"d(d „Zˆ xZS ))ÚSuperaá  Proxy class over a super call.

    This class offers almost the same behaviour as Python's super,
    which is MRO lookups for retrieving attributes from the parents.

    The *mro_pointer* is the place in the MRO from where we should
    start looking, not counting it. *mro_type* is the object which
    provides the MRO, it can be both a type or an instance.
    *self_class* is the class where the super call is, while
    *scope* is the function where the super call is.
    Úmro_pointerr   Úmro_typeÚ
self_classúscoped_nodes.ClassDefÚscopeúscoped_nodes.FunctionDefÚcallúnode_classes.Callr   ÚNonec                óÂ   •— || _         || _        d| _        || _        || _        t          ¦   «                              ||j        |j        |j	        |j
        ¬¦  «         d S )NF)ÚparentÚlinenoÚ
col_offsetÚ
end_linenoÚend_col_offset)Útyper;   Ú_class_basedÚ_self_classÚ_scopeÚsuperÚ__init__rF   rG   rH   rI   )r    r;   r<   r=   r?   rA   Ú	__class__s         €r!   rO   zSuper.__init__B   sp   ø€ ð ˆŒ	Ø&ˆÔØ!ˆÔØ%ˆÔØˆŒÝ‰Œ×ÒØØ”<ØÔ'ØÔ'Ø Ô/ð 	ñ 	
ô 	
ð 	
ð 	
ð 	
r#   Nr$   r%   r&   r   c              +  ó   K  — | V — d S r(   r   r)   s      r!   r*   zSuper._inferW   r+   r#   c                ó2  — t          | j        t          j        ¦  «        st	          d| ¬¦  «        ‚t          | j        t          j        ¦  «        rd| _        | j        }nMt          | j        dd¦  «        }t          |t          j	        t          j        f¦  «        st	          d| ¬¦  «        ‚|j
        st	          d| ¬¦  «        ‚|                     ¦   «         }| j        |vrt	          d| ¬¦  «        ‚|                     | j        ¦  «        }||dz   d…         S )	zBGet the MRO which will be used to lookup attributes in this super.zIThe first argument to super must be a subtype of type, not {mro_pointer}.)Úsuper_Tr3   NzPThe second argument to super must be an instance or subtype of type, not {type}.z*Unable to call super on old-style classes.é   )Ú
isinstancer;   r   ÚClassDefr   rJ   rK   r0   r   ÚInstanceÚnewstyleÚmroÚindex)r    r<   rY   rZ   s       r!   Ú	super_mrozSuper.super_mroZ   s7  € å˜$Ô*­LÔ,AÑBÔBð 	Ýð+àðñ ô ð õ �d”i¥Ô!6Ñ7Ô7ð 	à $ˆDÔØ”yˆHˆHå˜tœy¨*°dÑ;Ô;ˆHÝ˜h­¬½Ô9NÐ(OÑPÔPð Ý ð?àðñ ô ð ð Ô ð 	XÝÐIÐRVÐWÑWÔWÐWà�lŠl‰nŒnˆØÔ 3Ð&Ð&Ýð;àðñ ô ð ð —	’	˜$Ô*Ñ+Ô+ˆØ�5˜1‘9�;�;ÔÐr#   c                ó^   — t          ¦   «         j        }|                     d¦  «        d         S )NrN   r   r.   r1   s     r!   r3   zSuper._proxied~   s)   € å%Ñ'Ô'Ô7ˆØ×#Ò# GÑ,Ô,¨QÔ/Ð/r#   úLiteral['builtins.super']c                ó   — dS )Nzbuiltins.superr   r   s    r!   r"   zSuper.pytypeƒ   s   € ØÐr#   Ústrc                ó   — dS )NzSuper ofr   r   s    r!   Údisplay_typezSuper.display_type†   s   € Øˆzr#   c                ó   — | j         j        S )z Get the name of the MRO pointer.)r;   Únamer   s    r!   rc   z
Super.name‰   s   € ð ÔÔ$Ð$r#   úLiteral['super']c                ó   — dS )NrN   r   r   s    r!   ÚqnamezSuper.qnameŽ   s   € Øˆwr#   rc   úIterator[InferenceResult]c           	   #  ó�  K  — |dk    r| j                              |¦  «        V — dS 	 |                      ¦   «         }nY# t          $ r}t	          d| |||j        ¬¦  «        |‚d}~wt          $ r%}t	          d| |||j        |j        ¬¦  «        |‚d}~ww xY wd}|D �]m}||j	        vrŒd}t          j        ||         g|| ¬	¦  «        D �]>}t          |t          j        ¦  «        s|V — Œ"|j        d
k    rt          j        ||¦  «        V — ŒE| j        j        d
k    r|j        dk    r|V — Œe| j        s|j        dk    r|V — Œ|t          |t&          ¦  «        rD|j        }	 |                     | |¬¦  «        E d{V —† Œ·# t,          $ r t.          j        V — Y ŒÑw xY wt          j        |¦  «        r>	 |                     | |¦  «        E d{V —† �Œ# t,          $ r t.          j        V — Y �Œ#w xY wt          j        ||¦  «        V — �Œ@�Œo|s'|| j         v r| j                              |¦  «        V — dS |st	          | ||¬¦  «        ‚dS )z9Retrieve the inferred values of the given attribute name.rP   NzHLookup for {name} on {target!r} because super call {super!r} is invalid.)ÚtargetÚ	attributer$   rS   zJLookup for {name} on {target!r} failed because {cls!r} has an invalid MRO.)ri   rj   r$   ÚmrosÚclsFT)ÚframeÚclassmethodÚmethodÚstaticmethod©Úcallerr$   )ri   rj   r$   )Úspecial_attributesÚlookupr[   r   r   rS   r   rk   rl   Úlocalsr   Ú_infer_stmtsrU   r   ÚFunctionDefrJ   ÚBoundMethodrM   rK   ÚPropertyÚfunctionÚinfer_call_resultr   r   ÚUninferableÚ_is_property)	r    rc   r$   rY   ÚexcÚfoundrl   Úinferredrz   s	            r!   ÚigetattrzSuper.igetattr‘   sb  è è € ð �;ÒÐØÔ)×0Ò0°Ñ6Ô6Ð6Ð6Ð6ØˆFð	Ø—.’.Ñ"Ô"ˆCˆCøõ ð 
	ð 
	ð 
	Ý)ð"ð ØØØ”zð	ñ 	ô 	ð ð	øøøøõ ð 	ð 	ð 	Ý)ð#ð ØØØ”XØ”Gð
ñ 
ô 
ð ð
øøøøð	øøøð ˆØð !	;ñ !	;ˆCØ˜3œ:Ð%Ð%ØàˆEÝ!Ô.°°D´	¨{¸GÈ4ÐPÑPÔPð ;ñ ;�Ý! (­LÔ,DÑEÔEð Ø"�N�N�NØð ”= MÒ1Ð1ÝÔ+¨H°cÑ:Ô:Ð:Ð:Ð:Ð:Ø”[Ô%¨Ò6Ð6¸8¼=ÈHÒ;TÐ;TØ"�N�N�N�NØÔ&ð ;¨(¬-¸>Ò*IÐ*IØ"�N�N�N�NÝ ­(Ñ3Ô3ð ;Ø'Ô0�Hð/Ø#+×#=Ò#=Ø#'°ð $>ñ $ô $ð ð ð ð ð ð ð ð øõ *ð /ð /ð /Ý"Ô.Ð.Ð.Ð.Ð.Ð.ð/øøøåÔ'¨Ñ1Ô1ð ;ð/Ø#+×#=Ò#=¸dÀGÑ#LÔ#LÐLÐLÐLÐLÐLÐLÐLÑLøÝ)ð /ð /ð /Ý"Ô.Ð.Ð.Ð.Ð.Ñ.ð/øøøõ  Ô+¨H°cÑ:Ô:Ð:Ð:Ð:Ñ:ñ9;ð@ ð 	˜ Ô!8Ð8Ð8ØÔ)×0Ò0°Ñ6Ô6Ð6Ð6Ð6ØˆFàð 	XÝ)°ÀÈwÐWÑWÔWÐWð	Xð 	XsE   ¨= ½
BÁA!Á!BÁ. BÂBÅ E>Å>FÆFÆ1GÇG+Ç*G+c                óJ   — t          |                      ||¬¦  «        ¦  «        S )N)r$   )Úlistr�   )r    rc   r$   s      r!   r0   zSuper.getattrã   s    € Ý�D—M’M $°�MÑ8Ô8Ñ9Ô9Ð9r#   )r;   r   r<   r   r=   r>   r?   r@   rA   rB   r   rC   r(   r4   )r   r]   ©r   r_   )r   rd   )rc   r_   r$   r%   r   rg   )r$   r%   )r5   r6   r7   r8   r   Ú
SuperModelrs   rO   r*   r[   r   r3   r"   ra   Úpropertyrc   rf   r�   r0   Ú__classcell__©rP   s   @r!   r:   r:   3   s8  ø€ € € € € ð
ð 
ð 0˜Ô/Ñ1Ô1Ðð
ð 
ð 
ð 
ð 
ð 
ð*ð ð ð ð ð" ð " ð " ðH ð0ð 0ñ „_ð0ð ð  ð  ð  ðð ð ð ð ð%ð %ñ „Xð%ðð ð ð ð =AðPXð PXð PXð PXð PXðd:ð :ð :ð :ð :ð :ð :ð :ð :r#   r:   c                  ó(   — e Zd ZdZed„ ¦   «         ZdS )ÚExceptionInstancezÑClass for instances of exceptions.

    It has special treatment for some of the exceptions's attributes,
    which are transformed at runtime into certain concrete objects, such as
    the case of .args.
    c                ó¤   — |                       ¦   «         }t          j                             |t          j        ¦  «        }  |¦   «         | ¦  «        S r(   )rf   r   ÚBUILTIN_EXCEPTIONSÚgetÚExceptionInstanceModel)r    rf   Úinstances      r!   rs   z$ExceptionInstance.special_attributesï   sG   € à—
’
‘”ˆÝÔ1×5Ò5Ø•;Ô5ñ
ô 
ˆð ˆxˆx‰zŒz˜$ÑÔÐr#   N)r5   r6   r7   r8   r   rs   r   r#   r!   rŠ   rŠ   ç   s9   € € € € € ðð ð ð ð  ñ „_ð ð  ð  r#   rŠ   c                  ó0   — e Zd ZdZ ej        ¦   «         ZdS )ÚDictInstancezËSpecial kind of instances for dictionaries.

    This instance knows the underlying object model of the dictionaries, which means
    that methods such as .values or .items can be properly inferred.
    N)r5   r6   r7   r8   r   Ú	DictModelrs   r   r#   r!   r‘   r‘   ø   s-   € € € € € ðð ð /˜Ô.Ñ0Ô0ÐÐÐr#   r‘   c                  ó>   — e Zd Zej        j        Zej        j        ZdS )Ú	DictItemsN©r5   r6   r7   r   ÚNodeNGÚ__str__Ú__repr__r   r#   r!   r”   r”     ó$   € € € € € ØÔ!Ô)€GØÔ"Ô+€H€H€Hr#   r”   c                  ó>   — e Zd Zej        j        Zej        j        ZdS )ÚDictKeysNr•   r   r#   r!   r›   r›   
  r™   r#   r›   c                  ó>   — e Zd Zej        j        Zej        j        ZdS )Ú
DictValuesNr•   r   r#   r!   r�   r�     r™   r#   r�   c                  ó<   ‡ — e Zd ZdZdˆ fd„	Z	 ddˆ fd
„Zdd„Zˆ xZS )ÚPartialFunctionzEA class representing partial function obtained via functools.partial.Nc                óÐ  •— t          ¦   «                              |||t          j        ¦   «         dd¬¦  «         || _        |j        dd …         | _        |j        | _        |j        d         }t          | 
                    ¦   «         ¦  «        }t          |t          ¦  «        r)|j        | j        z   | _        i |j        ¥| j        ¥| _        t          | j        ¦  «        | _        d S )Nr   ©rF   rG   rE   rI   rH   rT   )rN   rO   r   ÚUnknownrE   Úpositional_argumentsÚfilled_argsÚkeyword_argumentsÚfilled_keywordsÚnextÚinferrU   rŸ   ÚlenÚfilled_positionals)	r    rA   rc   rF   rG   rE   Úwrapped_functionÚinferred_wrapped_functionrP   s	           €r!   rO   zPartialFunction.__init__  sñ   ø€ å‰Œ×ÒØØØ!ÝÔ'Ñ)Ô)ØØð 	ñ 	
ô 	
ð 	
ð ˆŒØÔ4°Q°R°RÔ8ˆÔØ#Ô5ˆÔàÔ4°QÔ7ÐÝ$(Ð)9×)?Ò)?Ñ)AÔ)AÑ$BÔ$BÐ!ÝÐ/µÑAÔAð 	Ø8ÔDÀtÔGWÑWˆDÔð$Ø+Ô;ð$àÔ&ð$ˆDÔ õ
 #& dÔ&6Ñ"7Ô"7ˆÔÐÐr#   rr   ú SuccessfulInferenceResult | Noner$   r%   r   rg   c                óh  •— |r�|j         s
J d¦   «         ‚d„ |j         j        D ¦   «         }| j                             ¦   «         D ]*\  }}||vr!|j         j                             ||f¦  «         Œ+|j         j        pg }| j        |z   |j         _        t          ¦   «                              ||¬¦  «        S )Nz6CallContext should be set before inferring call resultc                ó   — h | ]\  }}|’ŒS r   r   )Ú.0ÚkeywordÚ_s      r!   ú	<setcomp>z4PartialFunction.infer_call_result.<locals>.<setcomp>;  s)   € ð 'ð 'ð 'Ù(˜W a�ð'ð 'ð 'r#   rq   )	ÚcallcontextÚkeywordsr¦   ÚitemsÚappendÚargsr¤   rN   r{   )r    rr   r$   Úcurrent_passed_keywordsr±   ÚvalueÚcall_context_argsrP   s          €r!   r{   z!PartialFunction.infer_call_result2  sî   ø€ ð
 ð 	LàÔ#ðHð HàGñHô Hð Hð'ð 'Ø,3Ô,?Ô,Hð'ñ 'ô 'Ð#ð #'Ô"6×"<Ò"<Ñ">Ô">ð Jð J‘�˜ØÐ"9Ð9Ð9ØÔ'Ô0×7Ò7¸À%Ð8HÑIÔIÐIøà 'Ô 3Ô 8Ð >¸BÐØ'+Ô'7Ð:KÑ'KˆGÔÔ$å‰wŒw×(Ò(°ÀÐ(ÑHÔHÐHr#   r_   c                ó   — | j         j        S r(   )rP   r5   r   s    r!   rf   zPartialFunction.qnameG  s   € ØŒ~Ô&Ð&r#   ©NNNNr(   )rr   r­   r$   r%   r   rg   r„   )r5   r6   r7   r8   rO   r{   rf   r‡   rˆ   s   @r!   rŸ   rŸ     s†   ø€ € € € € ØOÐOð8ð 8ð 8ð 8ð 8ð 8ð< ,0ðIð Ið Ið Ið Ið Ið Ið*'ð 'ð 'ð 'ð 'ð 'ð 'ð 'r#   rŸ   c                  óf   ‡ — e Zd ZdZdˆ fd„	Z ej        ¦   «         ZdZdd„Z		 ddd„Z
	 ddd„Zˆ xZS )ry   z%Class representing a Python property.Nc                óx   •— || _         t          ¦   «                              |||||j        |j        ¬¦  «         d S )Nr¡   )rz   rN   rO   rI   rH   )r    rz   rc   rF   rG   rE   rP   s         €r!   rO   zProperty.__init__S  sM   ø€ Ø ˆŒÝ‰Œ×ÒØØØ!ØØ#Ô2ØÔ*ð 	ñ 	
ô 	
ð 	
ð 	
ð 	
r#   r†   r   úLiteral['builtins.property']c                ó   — dS )Nzbuiltins.propertyr   r   s    r!   r"   zProperty.pytypea  s   € Ø"Ð"r#   rr   r­   r$   r%   r	   c                ó    — t          d¦  «        ‚)NzProperties are not callable)r   )r    rr   r$   s      r!   r{   zProperty.infer_call_resultd  s   € õ
 Ð:Ñ;Ô;Ð;r#   r    r   r&   r   úGenerator[_T, None, None]c              +  ó   K  — | V — d S r(   r   r)   s      r!   r*   zProperty._inferk  s   è è € ð ˆ
ˆ
ˆ
ˆ
ˆ
r#   r½   )r   rÀ   r(   )rr   r­   r$   r%   r   r	   )r    r   r$   r%   r&   r   r   rÃ   )r5   r6   r7   r8   rO   r   ÚPropertyModelrs   rJ   r"   r{   r*   r‡   rˆ   s   @r!   ry   ry   P  s«   ø€ € € € € Ø/Ð/ð	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 3˜Ô2Ñ4Ô4ÐØ€Dð#ð #ð #ð #ð ,0ð<ð <ð <ð <ð <ð 6:ðð ð ð ð ð ð ð ð r#   ry   N)2r8   Ú
__future__r   Úcollections.abcr   r   Ú	functoolsr   Útypingr   r   r	   r
   Úastroidr   r   Úastroid.contextr   Úastroid.exceptionsr   r   r   r   Úastroid.interpreterr   Úastroid.managerr   Úastroid.nodesr   r   Úastroid.typingr   r   r   ÚBaseContainerr   r–   r:   rW   rŠ   r‘   ÚProxyr”   r›   r�   rw   rŸ   ÚDictÚ	__bases__ry   r   r#   r!   ú<module>rÕ      só  ðð
ð ð #Ð "Ð "Ð "Ð "Ð "à /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ø %Ð %Ð %Ð %Ð %Ð %Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2à Ð Ð Ð Ð Ð Ð Ð Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,ðð ð ð ð ð ð ð ð ð ð ð ð ,Ð +Ð +Ð +Ð +Ð +Ø *Ð *Ð *Ð *Ð *Ð *Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ø EÐ EÐ EÐ EÐ EÐ EÐ EÐ Eà€WˆT�]„]€ð4ð 4ð 4ð 4ð 4�Ô*ñ 4ô 4ð 4ðq:ð q:ð q:ð q:ð q:ˆLÔñ q:ô q:ð q:ðh ð  ð  ð  ð  ˜œñ  ô  ð  ð"1ð 1ð 1ð 1ð 1�5”>ñ 1ô 1ð 1ð,ð ,ð ,ð ,ð ,�”ñ ,ô ,ð ,ð
,ð ,ð ,ð ,ð ,ˆuŒ{ñ ,ô ,ð ,ð
,ð ,ð ,ð ,ð ,�”ñ ,ô ,ð ,ð
4'ð 4'ð 4'ð 4'ð 4'�lÔ.ñ 4'ô 4'ð 4'ðr  ,Ô2°LÐA€Ô Ô ðð ð ð ð ˆ|Ô'ñ ô ð ð ð r#   