§
    ñyIf/^  ã                  ó&  — d Z ddlmZ ddlZddlmZmZ ddlmZm	Z	m
Z
 ddlmZmZmZmZmZmZ ddlmZmZmZ ddlmZ dd	lmZmZmZ dd
lmZmZ ddlm Z  ddl!m"Z" ddl#m$Z$ erJddl%m&Z& ee$ee$         eej'        ej(        f         e$ee$         eege)e
ee$ddf                           f         Z* G d„ de"¦  «        Z+ G d„ de"¦  «        Z, G d„ de"¦  «        Z- G d„ de"¦  «        Z. G d„ de.¦  «        Z/ G d„ de-e,e+¦  «        Z0 G d„ de"¦  «        Z1 G d„ de1¦  «        Z2 G d„ d e"¦  «        Z3d7d#„Z4d7d$„Z5d%d&d'd(d)d*d+d,d-d.d/d0d1d2œZ6d3„ e6 7                    ¦   «         D ¦   «         Z8d4„ e6 7                    ¦   «         D ¦   «         Z9 G d5„ d6e"¦  «        Z:dS )8zThis module contains some base nodes that can be inherited for the different nodes.

Previously these were called Mixin nodes.
é    )ÚannotationsN)Ú	GeneratorÚIterator)Úcached_propertyÚ	lru_cacheÚpartial)ÚTYPE_CHECKINGÚAnyÚCallableÚClassVarÚOptionalÚUnion)ÚbasesÚnodesÚutil)Ú
PY310_PLUS)ÚCallContextÚInferenceContextÚbind_context_to_node)ÚAttributeInferenceErrorÚInferenceError)Údunder_lookup)ÚNodeNG)ÚInferenceResult)ÚLocalsDictNodeNGc                  ó$   — e Zd ZdZdZ	 d„ Zd„ ZdS )Ú	StatementzpStatement node adding a few attributes.

    NOTE: This class is part of the public API of 'astroid.nodes'.
    Tc                óš   — | j                              | ¦  «        }|                     | ¦  «        }	 ||dz            S # t          $ r Y dS w xY w)z|The next sibling statement node.

        :returns: The next sibling statement node.
        :rtype: NodeNG or None
        é   N)ÚparentÚchild_sequenceÚindexÚ
IndexError©ÚselfÚstmtsr"   s      úM/var/www/piapp/venv/lib/python3.11/site-packages/astroid/nodes/_base_nodes.pyÚnext_siblingzStatement.next_sibling:   s`   € ð ”×*Ò*¨4Ñ0Ô0ˆØ—’˜DÑ!Ô!ˆð	Ø˜ ™Ô#Ð#øÝð 	ð 	ð 	Ø�4�4ð	øøøs   ±
< ¼
A
Á	A
c                ó†   — | j                              | ¦  «        }|                     | ¦  «        }|dk    r||dz
           S dS )zThe previous sibling statement.

        :returns: The previous sibling statement node.
        :rtype: NodeNG or None
        r   N)r    r!   r"   r$   s      r'   Úprevious_siblingzStatement.previous_siblingG   sG   € ð ”×*Ò*¨4Ñ0Ô0ˆØ—’˜DÑ!Ô!ˆØ�AŠ:ˆ:Ø˜ ™Ô#Ð#Øˆtó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úis_statementr(   r*   © r+   r'   r   r   1   sF   € € € € € ðð ð
 €LØ2ðð ð ð
ð 
ð 
ð 
ð 
r+   r   c                  ó   — e Zd ZdZdd„ZdS )ÚNoChildrenNodez1Base nodes for nodes with no children, e.g. Pass.ÚreturnúIterator[NodeNG]c              #  ó   K  — dE d {V —† d S )Nr1   r1   ©r%   s    r'   Úget_childrenzNoChildrenNode.get_childrenW   s   è è € Øˆˆˆˆˆˆˆˆˆr+   N)r4   r5   )r,   r-   r.   r/   r8   r1   r+   r'   r3   r3   T   s.   € € € € € Ø;Ð;ðð ð ð ð ð r+   r3   c                  ó    — e Zd ZdZdd„Zd„ ZdS )ÚFilterStmtsBaseNodez6Base node for statement filtering and assignment type.ÚmystmtúStatement | Nonec                ó@   — |                       ¦   «         |u r|gdfS |dfS )zAMethod used in _filter_stmts to get statements and trigger break.TF©Ú	statement)r%   Ú_ÚnodeÚ_stmtsr;   s        r'   Ú_get_filtered_stmtsz'FilterStmtsBaseNode._get_filtered_stmts^   s/   € à�>Š>ÑÔ˜vÐ%Ð%ð �6˜4�<ÐØ�uˆ}Ðr+   c                ó   — | S ©Nr1   r7   s    r'   Úassign_typezFilterStmtsBaseNode.assign_typef   ó   € Øˆr+   N©r;   r<   )r,   r-   r.   r/   rC   rF   r1   r+   r'   r:   r:   [   s=   € € € € € Ø@Ð@ðð ð ð ðð ð ð ð r+   r:   c                  ó    — e Zd ZdZd„ Zdd„ZdS )ÚAssignTypeNodez8Base node for nodes that can 'assign' such as AnnAssign.c                ó   — | S rE   r1   r7   s    r'   rF   zAssignTypeNode.assign_typem   rG   r+   r;   r<   c                óP   — | |u r|dfS |                       ¦   «         |u r|gdfS |dfS )zMethod used in filter_stmts.TFr>   )r%   Úlookup_noderA   rB   r;   s        r'   rC   z"AssignTypeNode._get_filtered_stmtsp   sB   € à�6ˆ>ˆ>Ø˜4�<ÐØ�>Š>ÑÔ˜vÐ%Ð%ð �6˜4�<ÐØ�uˆ}Ðr+   NrH   )r,   r-   r.   r/   rF   rC   r1   r+   r'   rJ   rJ   j   s=   € € € € € ØBÐBðð ð ðð ð ð ð ð r+   rJ   c                  ó   — e Zd ZdZd„ ZdS )ÚParentAssignNodezGBase node for nodes whose assign_type is determined by the parent node.c                ó4   — | j                              ¦   «         S rE   )r    rF   r7   s    r'   rF   zParentAssignNode.assign_type~   s   € ØŒ{×&Ò&Ñ(Ô(Ð(r+   N)r,   r-   r.   r/   rF   r1   r+   r'   rO   rO   {   s)   € € € € € ØQÐQð)ð )ð )ð )ð )r+   rO   c                  óD   — e Zd ZU dZded<   	 ded<   	 d„ Zddd
„Zdd„ZdS )Ú
ImportNodez$Base node for From and Import Nodes.ú
str | NoneÚmodnamezlist[tuple[str, str | None]]Únamesc                ó   — |S rE   r1   )r%   ÚframeÚnames      r'   Ú_infer_namezImportNode._infer_name’   rG   r+   Nr4   únodes.Modulec                ó  — |                       ¦   «         }t          | dd¦  «        }|€| j        }|r"|                     ||¦  «        |j        k    rd}nd}|                     ||t          |o|dk    ¦  «        |¬¦  «        S )zGReturn the ast for a module whose name is <modname> imported by <self>.ÚlevelNFTr   )r\   Úrelative_onlyÚ	use_cache)ÚrootÚgetattrrT   Úrelative_to_absolute_namerX   Úimport_moduleÚbool)r%   rT   Úmymoduler\   r^   s        r'   Údo_import_modulezImportNode.do_import_module•   s�   € à—9’9‘;”;ˆÝ# D¨'°4Ñ8Ô8ˆØˆ?Ø”lˆGð
 ð	ð ×2Ò2°7¸EÑBÔBÀhÄmÒSÐSàˆIˆIàˆIð ×%Ò%ØØÝ˜uÐ3¨°!ªÑ4Ô4Øð	 &ñ 
ô 
ð 	
r+   ÚasnameÚstrc                ó¨   — | j         D ]9\  }}|dk    r|c S |s|                     dd¦  «        d         }|}||k    r|c S Œ:t          d| |¬¦  «        ‚)zGet name from 'as' name.Ú*ú.r   r   z:Could not find original name for {attribute} in {target!r})ÚtargetÚ	attribute)rU   Úsplitr   )r%   rf   rX   Ú_asnames       r'   Ú	real_namezImportNode.real_name¯   s‡   € à!œZð 	ð 	‰MˆD�'Ø�sŠ{ˆ{Ø���Øð Ø—z’z # qÑ)Ô)¨!Ô,�Ø�Ø˜Ò Ð Ø���ð !å%ØHØØð
ñ 
ô 
ð 	
r+   rE   )rT   rS   r4   rZ   )rf   rg   r4   rg   )r,   r-   r.   r/   Ú__annotations__rY   re   ro   r1   r+   r'   rR   rR   ‚   s|   € € € € € € Ø.Ð.àÐÐÑðð
 (Ð'Ð'Ñ'ððð ð ð
ð 
ð 
ð 
ð 
ð4
ð 
ð 
ð 
ð 
ð 
r+   rR   c                  ób   — e Zd ZU dZdZded<   ed„ ¦   «         Zd„ Zd„ Z	d„ Z
edd„¦   «         ZdS )ÚMultiLineBlockNodea(  Base node for multi-line blocks, e.g. For and FunctionDef.

    Note that this does not apply to every node with a `body` field.
    For instance, an If node has a multi-line body, but the body of an
    IfExpr is not multi-line, and hence cannot contain Return nodes,
    Assign nodes, etc.
    r1   zClassVar[tuple[str, ...]]Ú_multi_line_block_fieldsc                óD   ‡ — t          ˆ fd„‰ j        D ¦   «         ¦  «        S )Nc              3  ó8   •K  — | ]}t          ‰|¦  «        V — Œd S rE   )r`   )Ú.0Úfieldr%   s     €r'   ú	<genexpr>z8MultiLineBlockNode._multi_line_blocks.<locals>.<genexpr>Í   s-   øè è € ÐUÐU¨e•W˜T 5Ñ)Ô)ÐUÐUÐUÐUÐUÐUr+   )Útuplers   r7   s   `r'   Ú_multi_line_blocksz%MultiLineBlockNode._multi_line_blocksË   s)   ø€ åÐUÐUÐUÐU°tÔ7TÐUÑUÔUÑUÔUÐUr+   c              #  ól   K  — | j         D ])}|D ]$}|j        rŒ
|                     ¦   «         E d {V —† Œ%Œ*d S rE   )rz   Úis_functionÚ _get_return_nodes_skip_functions©r%   ÚblockÚ
child_nodes      r'   r}   z3MultiLineBlockNode._get_return_nodes_skip_functionsÏ   sr   è è € ØÔ,ð 	Ið 	IˆEØ#ð Ið I�
ØÔ)ð ØØ%×FÒFÑHÔHÐHÐHÐHÐHÐHÐHÐHÐHðIð	Ið 	Ir+   c              #  ól   K  — | j         D ])}|D ]$}|j        rŒ
|                     ¦   «         E d {V —† Œ%Œ*d S rE   )rz   r|   Ú_get_yield_nodes_skip_functionsr~   s      r'   r‚   z2MultiLineBlockNode._get_yield_nodes_skip_functionsÖ   sr   è è € ØÔ,ð 	Hð 	HˆEØ#ð Hð H�
ØÔ)ð ØØ%×EÒEÑGÔGÐGÐGÐGÐGÐGÐGÐGÐGðHð	Hð 	Hr+   c              #  ól   K  — | j         D ])}|D ]$}|j        rŒ
|                     ¦   «         E d {V —† Œ%Œ*d S rE   )rz   Ú	is_lambdaÚ_get_yield_nodes_skip_lambdasr~   s      r'   r…   z0MultiLineBlockNode._get_yield_nodes_skip_lambdasÝ   sr   è è € ØÔ,ð 	Fð 	FˆEØ#ð Fð F�
ØÔ'ð ØØ%×CÒCÑEÔEÐEÐEÐEÐEÐEÐEÐEÐEðFð	Fð 	Fr+   r4   úlist[nodes.Assign]c                ó|   — d„ | j         D ¦   «         }t          t          j                             |¦  «        ¦  «        S )Nc              3  ó.   K  — | ]}|D ]}|j         V — ŒŒd S rE   )Ú_assign_nodes_in_scope)rv   r   r€   s      r'   rx   z<MultiLineBlockNode._assign_nodes_in_scope.<locals>.<genexpr>æ   sP   è è € ð !
ð !
àØ#ð!
ð !
ð ð Ô-ð!
ð !
ð !
ð !
ð !
ð !
ð !
r+   )rz   ÚlistÚ	itertoolsÚchainÚfrom_iterable)r%   Úchildren_assign_nodess     r'   r‰   z)MultiLineBlockNode._assign_nodes_in_scopeä   sE   € ð!
ð !
àÔ0ð!
ñ !
ô !
Ðõ
 •I”O×1Ò1Ð2GÑHÔHÑIÔIÐIr+   N)r4   r†   )r,   r-   r.   r/   rs   rp   r   rz   r}   r‚   r…   r‰   r1   r+   r'   rr   rr   À   s¬   € € € € € € ðð ð ;=ÐÐ<Ð<Ð<Ñ<àðVð Vñ „_ðVðIð Ið IðHð Hð HðFð Fð Fð ðJð Jð Jñ „_ðJð Jð Jr+   rr   c                  ó4   — e Zd ZdZed„ ¦   «         Z	 ddd„ZdS )ÚMultiLineWithElseBlockNodez>Base node for multi-line blocks that can have else statements.c                ó   — | j         S rE   )Úlinenor7   s    r'   Úblockstart_tolinenoz.MultiLineWithElseBlockNode.blockstart_tolinenoñ   s
   € àŒ{Ðr+   Nr’   ÚintÚorelseúlist[nodes.NodeNG]Úlastú
int | Noner4   útuple[int, int]c                óž   — || j         k    r||fS |r2||d         j         k    r||d         j        fS ||d         j         dz
  fS ||p| j        fS )z_Handle block line numbers range for try/finally, for, if and while
        statements.
        r   éÿÿÿÿr   )Ú
fromlinenoÚtolineno)r%   r’   r•   r—   s       r'   Ú_elsed_block_rangez-MultiLineWithElseBlockNode._elsed_block_rangeõ   sp   € ð �T”_Ò$Ð$Ø˜6�>Ð!Øð 	4Ø˜ œÔ-Ò-Ð-Ø˜v bœzÔ2Ð2Ð2Ø˜6 !œ9Ô/°!Ñ3Ð3Ð3Ø�tÐ,˜tœ}Ð,Ð,r+   rE   )r’   r”   r•   r–   r—   r˜   r4   r™   )r,   r-   r.   r/   r   r“   rž   r1   r+   r'   r�   r�   î   sS   € € € € € ØHÐHàðð ñ „_ðð KOð-ð -ð -ð -ð -ð -ð -r+   r�   c                  ó0   — e Zd ZdZed	d„¦   «         Zd„ ZdS )
ÚLookupMixInz+Mixin to look up a name in the right scope.rX   rg   r4   ú%tuple[LocalsDictNodeNG, list[NodeNG]]c                óR   — |                       ¦   «                              | |¦  «        S )a#  Lookup where the given variable is assigned.

        The lookup starts from self's scope. If self is not a frame itself
        and the name is found in the inner frame locals, statements will be
        filtered to remove ignorable statements according to self's location.

        :param name: The name of the variable to find assignments for.

        :returns: The scope node and the list of assignments associated to the
            given name according to the scope where it has been found (locals,
            globals or builtin).
        )ÚscopeÚscope_lookup)r%   rX   s     r'   ÚlookupzLookupMixIn.lookup  s"   € ð �zŠz‰|Œ|×(Ò(¨¨tÑ4Ô4Ð4r+   c                óz   — |                       |¦  «        \  }}t          ¦   «         }t          j        |||¦  «        S )a
  Lookup the inferred values of the given variable.

        :param name: The variable name to find values for.
        :type name: str

        :returns: The inferred values of the statements returned from
            :meth:`lookup`.
        :rtype: iterable
        )r¥   r   r   Ú_infer_stmts)r%   rX   rW   r&   Úcontexts        r'   ÚilookupzLookupMixIn.ilookup  s9   € ð —{’{ 4Ñ(Ô(‰ˆˆuÝ"Ñ$Ô$ˆÝÔ! %¨°%Ñ8Ô8Ð8r+   N)rX   rg   r4   r¡   )r,   r-   r.   r/   r   r¥   r©   r1   r+   r'   r    r      sG   € € € € € Ø5Ð5àð5ð 5ð 5ñ „Yð5ð9ð 9ð 9ð 9ð 9r+   r    r4   rg   c                ó   — d| dd …         z   S )NÚ__ré   r1   ©rX   s    r'   Ú_reflected_namer®   &  ó   € Ø�4˜˜˜”8ÑÐr+   c                ó   — d| dd …         z   S )NÚ__ir¬   r1   r­   s    r'   Ú_augmented_namer²   *  r¯   r+   Ú__add__Ú__sub__Ú__truediv__Ú__floordiv__Ú__mul__Ú__pow__Ú__mod__Ú__and__Ú__or__Ú__xor__Ú
__lshift__Ú
__rshift__Ú
__matmul__)ú+ú-ú/z//ri   z**ú%ú&ú|ú^z<<z>>ú@c                ó4   — i | ]\  }}|t          |¦  «        “ŒS r1   )r®   ©rv   ÚkeyÚvalues      r'   ú
<dictcomp>rÌ   >  s3   € ð ð ð Ù$0 S¨%€C�˜Ñ	Ô	ðð ð r+   c                ó:   — i | ]\  }}|d z   t          |¦  «        “ŒS )ú=)r²   rÉ   s      r'   rÌ   rÌ   A  s7   € ð ð ð Ù*6¨3°€Cˆ#�I�˜uÑ%Ô%ðð ð r+   c                  ó4  — e Zd Zed4d	„¦   «         Zed5d„¦   «         Zed6d„¦   «         Zed7d„¦   «         Ze	 d8d9d„¦   «         Ze	 d8d:d„¦   «         Z	ed;d#„¦   «         Z
ed$„ ¦   «         Zed5d%„¦   «         Zed<d,„¦   «         Zed=d.„¦   «         Zed>d2„¦   «         Zd3S )?ÚOperatorNodeÚinfer_callableúfCallable[[InferenceContext | None], Generator[InferenceResult | util.BadOperationMessage, None, None]]r¨   úInferenceContext | NoneÚerrorútype[util.BadOperationMessage]r4   ú&Generator[InferenceResult, None, None]c              #  ól   K  —  | |¦  «        D ]%}t          ||¦  «        rt          j        V — Œ!|V — Œ&d S rE   )Ú
isinstancer   ÚUninferable)rÑ   r¨   rÔ   Úresults       r'   Ú_filter_operation_errorsz%OperatorNode._filter_operation_errorsG  s\   è è € ð %�n WÑ-Ô-ð 	ð 	ˆFÝ˜& %Ñ(Ô(ð õ Ô&Ð&Ð&Ð&Ð&à����ð	ð 	r+   rc   c                óR   — t          | t          j        ¦  «        o| j        t          u S )z0Check if the given const node is NotImplemented.)rØ   r   ÚConstrË   ÚNotImplemented)Úconsts    r'   Ú_is_not_implementedz OperatorNode._is_not_implementedY  s"   € õ ˜%¥¤Ñ-Ô-ÐO°%´+ÅÐ2OÐOr+   Úinstanceúnodes.ConstÚotherúnodes.NodeNGr   ú)tuple[util.UninferableBase | nodes.Const]c                ót  ‡— t          |t          j        ¦  «        rit          j        |j        v rt          j        fS ˆfd„|j        D ¦   «         }t          d„ |D ¦   «         ¦  «        rt          d„ |D ¦   «         ¦  «        }nðd}nít          |t          j        ¦  «        r¤i }|j	        D ]™}t          j
        |d         ‰¦  «        }t          |t          j        ¦  «        st          j        fc S t          j
        |d         ‰¦  «        }t          |t          j        ¦  «        st          j        fc S |j        ||j        <   Œšn/t          |t          j        ¦  «        r|j        }nt          j        fS 	 t          j        | j        |z  ¦  «        fS # t          t          t           f$ r t          j        fcY S w xY w)z¶Infer the result of '"string" % ...'.

        TODO: Instead of returning Uninferable we should rely
        on the call to '%' to see if the result is actually uninferable.
        c                ó:   •— g | ]}t          j        |‰¦  «        ‘ŒS r1   )r   Ú
safe_infer)rv   Úir¨   s     €r'   ú
<listcomp>zCOperatorNode._infer_old_style_string_formatting.<locals>.<listcomp>j  s%   ø€ Ð"SÐ"SÐ"SÀ1¥4¤?°1°gÑ#>Ô#>Ð"SÐ"SÐ"Sr+   c              3  óJ   K  — | ]}t          |t          j        ¦  «        V — Œd S rE   )rØ   r   rÝ   ©rv   ré   s     r'   rx   zBOperatorNode._infer_old_style_string_formatting.<locals>.<genexpr>k  s.   è è € ÐKÐK°!•:˜a¥¤Ñ-Ô-ÐKÐKÐKÐKÐKÐKr+   c              3  ó$   K  — | ]}|j         V — Œd S rE   )rË   rì   s     r'   rx   zBOperatorNode._infer_old_style_string_formatting.<locals>.<genexpr>l  s$   è è € ÐDÐD¨1˜qœwÐDÐDÐDÐDÐDÐDr+   Nr   r   )rØ   r   ÚTupler   rÙ   ÚeltsÚallry   ÚDictÚitemsrè   rÝ   rË   Úconst_factoryÚ	TypeErrorÚKeyErrorÚ
ValueError)rá   rã   r¨   Úinferred_positionalÚvaluesÚpairrÊ   rË   s     `     r'   Ú"_infer_old_style_string_formattingz/OperatorNode._infer_old_style_string_formatting^  sÌ  ø€ õ �e�Uœ[Ñ)Ô)ð 	'ÝÔ 5¤:Ð-Ð-ÝÔ(Ð*Ð*Ø"SÐ"SÐ"SÐ"SÈÌ
Ð"SÑ"SÔ"SÐÝÐKÐKÐ7JÐKÑKÔKÑKÔKð ÝÐDÐDÐ0CÐDÑDÔDÑDÔD��à��Ý˜�uœzÑ*Ô*ð 	'Ø%'ˆFØœð 0ð 0�Ý”o d¨1¤g¨wÑ7Ô7�Ý! #¥u¤{Ñ3Ô3ð /Ý Ô,Ð.Ð.Ð.Ð.Ýœ¨¨Q¬°Ñ9Ô9�Ý! %­¬Ñ5Ô5ð /Ý Ô,Ð.Ð.Ð.Ð.Ø$)¤K��s”yÑ!Ð!ð0õ ˜�uœ{Ñ+Ô+ð 	'Ø”[ˆFˆFåÔ$Ð&Ð&ð	'ÝÔ'¨¬¸Ñ(?Ñ@Ô@ÐBÐBøÝ�8¥ZÐ0ð 	'ð 	'ð 	'ÝÔ$Ð&Ð&Ð&Ð&ð	'øøøs   Å3F Æ$F7Æ6F7r   Úopnodeúnodes.AugAssign | nodes.BinOpÚoprg   Úmethod_namec                óÜ  — t          j        | |¦  «        }t          || ¦  «        }|d         }||j        _        t          | t          j        ¦  «        rIt          | j        t          ¦  «        r/|dk    r)t          t                               | ||¦  «        ¦  «        S 	 t          |                     |¬¦  «        ¦  «        }n$# t          $ r}	t!          ||¬¦  «        |	‚d}	~	ww xY wt          |t"          j        ¦  «        rt           ‚t          | t          j        t          j        t          j        t          j        t,          j        f¦  «        st           ‚|                      |||||¦  «        S )z8Invoke binary operation inference on the given instance.r   rÃ   )r¨   )rA   r¨   N)r   r¥   r   ÚcallcontextÚcalleerØ   r   rÝ   rË   rg   ÚiterrÐ   rú   ÚnextÚinferÚStopIterationr   r   ÚUninferableBaserî   ÚListÚClassDefr   ÚInstanceÚinfer_binary_op)
rá   rû   rý   rã   r¨   rþ   ÚmethodsÚmethodÚinferredÚes
             r'   Ú_invoke_binop_inferencez$OperatorNode._invoke_binop_inferenceƒ  sa  € õ  Ô& x°Ñ=Ô=ˆÝ& w°Ñ9Ô9ˆØ˜”ˆØ%+ˆÔÔ"õ �x¥¤Ñ-Ô-ð		å˜8œ>­3Ñ/Ô/ð		ð �c’	�	åÝ×?Ò?Ø˜e Wñô ñô ð ð	FÝ˜FŸLšL°˜LÑ9Ô9Ñ:Ô:ˆHˆHøÝð 	Fð 	Fð 	FÝ  f°gÐ>Ñ>Ô>ÀAÐEøøøøð	Føøøå�h¥Ô 4Ñ5Ô5ð 	!Ý Ð ÝØÝŒ[�%œ+¥u¤zµ5´>Å5Ä>ÐRñ
ô 
ð 	!õ !Ð Ø×'Ò'¨°°E¸7ÀHÑMÔMÐMs   Â#C Ã
C#ÃCÃC#Fúnodes.AugAssignÚreverseú/partial[Generator[InferenceResult, None, None]]c           	     ó\   — t           |         }t          t          j        | |||||¬¦  «        S )z<Get an inference callable for an augmented binary operation.©rá   rý   rû   rã   r¨   rþ   )ÚAUGMENTED_OP_METHODr   rÐ   r  ©rá   rû   rý   rã   r¨   r  rþ   s          r'   Ú_aug_opzOperatorNode._aug_opª  s=   € õ *¨"Ô-ˆÝÝÔ0ØØØØØØ#ð
ñ 
ô 
ð 	
r+   c           	     ó|   — |rt           |         }nt          |         }t          t          j        | |||||¬¦  «        S )z�Get an inference callable for a normal binary operation.

        If *reverse* is True, then the reflected method will be used instead.
        r  )ÚREFLECTED_BIN_OP_METHODÚBIN_OP_METHODr   rÐ   r  r  s          r'   Ú_bin_opzOperatorNode._bin_op¿  sQ   € ð ð 	,Ý1°"Ô5ˆKˆKå'¨Ô+ˆKÝÝÔ0ØØØØØØ#ð
ñ 
ô 
ð 	
r+   Úleftú.bases.UnionType | nodes.ClassDef | nodes.ConstÚrightc              #  ó8   K  — t          j        | |¦  «        V — dS )z>Create a new UnionType instance for binary or, e.g. int | str.N)r   Ú	UnionType)r  r  s     r'   Ú_bin_op_or_union_typez"OperatorNode._bin_op_or_union_typeÚ  s&   è è € õ Œo˜d EÑ*Ô*Ð*Ð*Ð*Ð*Ð*r+   c              #  ó‚   K  — ||fD ]7}|                       ¦   «         }t          |g¬¦  «        |_        d|_        |V — Œ8dS )zÔGet contexts for binary operations.

        This will return two inference contexts, the first one
        for x.__op__(y), the other one for y.__rop__(x), where
        only the arguments are inversed.
        )ÚargsN)Úcloner   r   Ú	boundnode)r¨   r  r  ÚargÚnew_contexts        r'   Ú_get_binop_contextsz OperatorNode._get_binop_contextsâ  s^   è è € ð ˜4�=ð 	ð 	ˆCØ!Ÿ-š-™/œ/ˆKÝ&1¸°uÐ&=Ñ&=Ô&=ˆKÔ#Ø$(ˆKÔ!ØÐÐÐÐð		ð 	r+   c                óV   — |                       ¦   «         |                      ¦   «         k    S )z$Check if type1 is the same as type2.)Úqname)Útype1Útype2s     r'   Ú
_same_typezOperatorNode._same_typeò  s   € ð �{Š{‰}Œ} §¢¡¤Ò-Ð-r+   Ú	left_typeúInferenceResult | NoneÚ
aug_opnodeÚ
right_typeÚreverse_contextú5list[partial[Generator[InferenceResult, None, None]]]c           
     óF  — ddl m} |j                             d¦  «        }|j        }	t                               ||¦  «        r>t                               | ||	||¦  «        t                               | ||||¦  «        g}
�n |                     ||¦  «        r=t                               | ||	||¦  «        t                               | ||||¦  «        g}
nÍ| 	                    ||¦  «        r\t                               | ||	||¦  «        t                               |||| |d¬¦  «        t                               | ||||¦  «        g}
n[t                               | ||	||¦  «        t                               | ||||¦  «        t                               |||| |d¬¦  «        g}
|
S )aº  Get the flow for augmented binary operations.

        The rules are a bit messy:

            * if left and right have the same type, then left.__augop__(right)
            is first tried and then left.__op__(right).
            * if left and right are unrelated typewise, then
            left.__augop__(right) is tried, then left.__op__(right)
            is tried and then right.__rop__(left) is tried.
            * if left is a subtype of right, then left.__augop__(right)
            is tried and then left.__op__(right).
            * if left is a supertype of right, then left.__augop__(right)
            is tried, then right.__rop__(left) and then
            left.__op__(right)
        r   ©ÚhelpersrÎ   T©r  )
Úastroidr6  rý   ÚstriprÐ   r-  r  r  Ú
is_subtypeÚis_supertype)r  r.  r0  r  r1  r¨   r2  r6  Úbin_opÚaug_opr  s              r'   Ú_get_aug_flowzOperatorNode._get_aug_flow÷  s½  € ð2 	$Ð#Ð#Ð#Ð#Ð#à”×$Ò$ SÑ)Ô)ˆØ”ˆÝ×"Ò" 9¨jÑ9Ô9ð 	å×$Ò$ T¨:°v¸uÀgÑNÔNÝ×$Ò$ T¨:°v¸uÀgÑNÔNðˆG‰Gð ×Ò 	¨:Ñ6Ô6ð 	å×$Ò$ T¨:°v¸uÀgÑNÔNÝ×$Ò$ T¨:°v¸uÀgÑNÔNðˆGˆGð ×!Ò! )¨ZÑ8Ô8ð 	å×$Ò$ T¨:°v¸uÀgÑNÔNÝ×$Ò$Ø˜: v¨t°_Èdð %ñ ô õ ×$Ò$ T¨:°v¸uÀgÑNÔNðˆGˆGõ ×$Ò$ T¨:°v¸uÀgÑNÔNÝ×$Ò$ T¨:°v¸uÀgÑNÔNÝ×$Ò$Ø˜: v¨t°_Èdð %ñ ô ðˆGð ˆr+   Úbinary_opnodec           	     ó¼  — ddl m} |j        }t                               ||¦  «        r t                               | ||||¦  «        g}	nÉ|                     ||¦  «        r t                               | ||||¦  «        g}	n“|                     ||¦  «        r?t                               |||| |d¬¦  «        t                               | ||||¦  «        g}	n>t                               | ||||¦  «        t                               |||| |d¬¦  «        g}	t          rÃ|dk    r½t          | t          j        t          j        f¦  «        s!t          | t          j        ¦  «        r}| j        €vt          |t          j        t          j        f¦  «        s!t          |t          j        ¦  «        r6|j        €/|	                     t#          t          j        | |¦  «        g¦  «         |	S )ax  Get the flow for binary operations.

        The rules are a bit messy:

            * if left and right have the same type, then only one
            method will be called, left.__op__(right)
            * if left and right are unrelated typewise, then first
            left.__op__(right) is tried and if this does not exist
            or returns NotImplemented, then right.__rop__(left) is tried.
            * if left is a subtype of right, then only left.__op__(right)
            is tried.
            * if left is a supertype of right, then right.__rop__(left)
            is first tried and then left.__op__(right)
        r   r5  Tr7  rÅ   )r8  r6  rý   rÐ   r-  r  r:  r;  r   rØ   r   r   r   r  rÝ   rË   Úextendr   r!  )
r  r.  r?  r  r1  r¨   r2  r6  rý   r  s
             r'   Ú_get_binop_flowzOperatorNode._get_binop_flow0  sí  € ð0 	$Ð#Ð#Ð#Ð#Ð#àÔˆÝ×"Ò" 9¨jÑ9Ô9ð 	Ý#×+Ò+¨D°-ÀÀUÈGÑTÔTÐUˆGˆGØ×Ò 	¨:Ñ6Ô6ð 	Ý#×+Ò+¨D°-ÀÀUÈGÑTÔTÐUˆGˆGØ×!Ò! )¨ZÑ8Ô8ð 	å×$Ò$Ø˜=¨"¨d°OÈTð %ñ ô õ ×$Ò$ T¨=¸"¸eÀWÑMÔMð	ˆGˆGõ ×$Ò$ T¨=¸"¸eÀWÑMÔMÝ×$Ò$Ø˜=¨"¨d°OÈTð %ñ ô ðˆGõ ð	Wà�c’	�	å˜4¥%¤/µ5´>Ð!BÑCÔCð õ ˜d¥E¤KÑ0Ô0ð ð ”JÐ&õ ˜5¥5¤?µE´NÐ"CÑDÔDð 'õ ˜e¥U¤[Ñ1Ô1ð	 'ð
 ”KÐ'ð �NŠN�G¥LÔ$FÈÈeÑTÔTÐUÑVÔVÐVØˆr+   Úflow_factoryÚGetFlowFactoryúGGenerator[InferenceResult | util.BadBinaryOperationMessage, None, None]c           	   #  óà  K  — ddl m} t                               || |¦  «        \  }}|                     | ¦  «        }|                     |¦  «        } || ||||||¦  «        }	|	D ]ë}
	 t           |
¦   «         ¦  «        }t          d„ |D ¦   «         ¦  «        rt          j        V —  dS t          t          t          j        |¦  «        ¦  «        rŒlt          d„ |D ¦   «         ¦  «        }|r$|t          |¦  «        k    rt          j        V —  dS |E d{V —†  dS # t          $ r Y ŒÂt          $ r Y ŒÍt           $ r t          j        V — Y  dS w xY wt          j        ||j        |¦  «        V — dS )zÛInfer a binary operation between a left operand and a right operand.

        This is used by both normal binary operations and augmented binary
        operations, the only difference is the flow factory used.
        r   r5  c              3  óJ   K  — | ]}t          |t          j        ¦  «        V — Œd S rE   )rØ   r   r  ©rv   rÚ   s     r'   rx   z7OperatorNode._infer_binary_operation.<locals>.<genexpr>‘  s/   è è € ÐVÐVÀF•z &­$Ô*>Ñ?Ô?ÐVÐVÐVÐVÐVÐVr+   Nc              3  óN   K  — | ] }t                                |¦  «        ¯d V — Œ!dS )r   N)rÐ   rà   rH  s     r'   rx   z7OperatorNode._infer_binary_operation.<locals>.<genexpr>—  sJ   è è € ð &ð &Ø ­|×/OÒ/OÐPVÑ/WÔ/Wð&Øð&ð &ð &ð &ð &ð &r+   )r8  r6  rÐ   r(  Úobject_typerŠ   Úanyr   rÙ   rð   Úmaprà   ÚsumÚlenÚAttributeErrorr   r   ÚBadBinaryOperationMessagerý   )r  r  r?  r¨   rC  r6  r2  r.  r1  r  r  ÚresultsÚnot_implementeds                r'   Ú_infer_binary_operationz$OperatorNode._infer_binary_operationo  s  è è € ð 	$Ð#Ð#Ð#Ð#Ð#å#/×#CÒ#CØ�T˜5ñ$
ô $
Ñ ˆ�ð ×'Ò'¨Ñ-Ô-ˆ	Ø×(Ò(¨Ñ/Ô/ˆ
Ø�,Ø�)˜]¨E°:¸wÈñ
ô 
ˆð ð 	ð 	ˆFðÝ˜v˜v™xœx™.œ.�õ ÐVÐVÈgÐVÑVÔVÑVÔVð ÝÔ*Ð*Ð*Ð*Ø�F�Få•s�<Ô;¸WÑEÔEÑFÔFð ØÝ"%ð &ð &Ø$+ð&ñ &ô &ñ #ô #�ð #ð  ½#¸g¹,¼,Ò'FÐ'FåÔ*Ð*Ð*Ð*Ø�F�Fà"Ð"Ð"Ð"Ð"Ð"Ð"Ð"Ø��øõ/ "ð ð ð Ø�Ý*ð ð ð Ø�Ý!ð ð ð ÝÔ&Ð&Ð&Ð&Ø���ðøøøõ, Ô,¨Y¸Ô8HÈ*ÑUÔUÐUÐUÐUÐUÐUs   Á(DÄ
EÄ'	EÄ2EÅEN)rÑ   rÒ   r¨   rÓ   rÔ   rÕ   r4   rÖ   )r4   rc   )rá   râ   rã   rä   r¨   r   r4   rå   )rá   r   rû   rü   rý   rg   rã   r   r¨   r   rþ   rg   r4   rÖ   )F)rá   r   rû   r  rý   rg   rã   r   r¨   r   r  rc   r4   r  )rá   r   rû   rü   rý   rg   rã   r   r¨   r   r  rc   r4   r  )r  r  r  r  r4   rÖ   )r  r   r.  r/  r0  r  r  r   r1  r/  r¨   r   r2  r   r4   r3  )r  r   r.  r/  r?  rü   r  r   r1  r/  r¨   r   r2  r   r4   r3  )r  r   r  r   r?  rü   r¨   r   rC  rD  r4   rE  )r,   r-   r.   ÚstaticmethodrÛ   rà   rú   r  r  r  r!  r(  r-  r>  rB  rS  r1   r+   r'   rÐ   rÐ   F  s³  € € € € € Øðð ð ñ „\ðð" ðPð Pð Pñ „\ðPð ð"'ð "'ð "'ñ „\ð"'ðH ð$Nð $Nð $Nñ „\ð$NðL ð ð
ð 
ð 
ð 
ñ „\ð
ð( ð ð
ð 
ð 
ð 
ñ „\ð
ð4 ð+ð +ð +ñ „\ð+ð ðð ñ „\ðð ð.ð .ð .ñ „\ð.ð ð6ð 6ð 6ñ „\ð6ðp ð<ð <ð <ñ „\ð<ð| ð3Vð 3Vð 3Vñ „\ð3Vð 3Vð 3Vr+   rÐ   )r4   rg   );r/   Ú
__future__r   r‹   Úcollections.abcr   r   Ú	functoolsr   r   r   Útypingr	   r
   r   r   r   r   r8  r   r   r   Úastroid.constr   Úastroid.contextr   r   r   Úastroid.exceptionsr   r   Úastroid.interpreterr   Úastroid.nodes.node_ngr   Úastroid.typingr   Úastroid.nodes.node_classesr   Ú	AugAssignÚBinOprŠ   rD  r   r3   r:   rJ   rO   rR   rr   r�   r    r®   r²   r  rò   r  r  rÐ   r1   r+   r'   ú<module>rb     sT  ðð
ð ð
 #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9Ð 9Ð 9Ð 9Ð 9Ø JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ Jà &Ð &Ð &Ð &Ð &Ð &Ð &Ð &Ð &Ð &Ø $Ð $Ð $Ð $Ð $Ð $ðð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð .Ð -Ð -Ð -Ð -Ð -Ø (Ð (Ð (Ð (Ð (Ð (Ø *Ð *Ð *Ð *Ð *Ð *àð Ø;Ð;Ð;Ð;Ð;Ð;ààØ�_Ô%Ø�%”/ 5¤;Ð.Ô/ØØ�_Ô%ØØð	
ð 	ˆW�Y˜°°dÐ:Ô;Ô<Ô=ð		?ô€Nð ð  ð  ð  ð  �ñ  ô  ð  ðFð ð ð ð �Vñ ô ð ðð ð ð ð ˜&ñ ô ð ðð ð ð ð �Vñ ô ð ð")ð )ð )ð )ð )�~ñ )ô )ð )ð;
ð ;
ð ;
ð ;
ð ;
Ð$ n°iñ ;
ô ;
ð ;
ð|+Jð +Jð +Jð +Jð +J˜ñ +Jô +Jð +Jð\-ð -ð -ð -ð -Ð!3ñ -ô -ð -ð,9ð 9ð 9ð 9ð 9�&ñ 9ô 9ð 9ðDð ð ð ðð ð ð ð
 
Ø	Ø	Ø
Ø	Ø
Ø	Ø	Ø	Ø	Ø
Ø
Ø	ðð €ð ð Ø4A×4GÒ4GÑ4IÔ4Iðñ ô Ð ðð Ø:G×:MÒ:MÑ:OÔ:Oðñ ô Ð ð
]Vð ]Vð ]Vð ]Vð ]V�6ñ ]Vô ]Vð ]Vð ]Vð ]Vr+   