§
    öyIfè  ã                  óz   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 erddlmZ  G d„ d	e¦  «        Zdd„ZdS )z!Ellipsis checker for Python code.é    )Úannotations)ÚTYPE_CHECKING)Únodes)ÚBaseChecker)Úonly_required_for_messages)ÚPyLinterc                  óD   — e Zd ZdZddiZ ed¦  «        dd	„¦   «         Zd
S )ÚEllipsisCheckerÚunnecessary_ellipsisÚW2301)zUnnecessary ellipsis constantúunnecessary-ellipsiszÖUsed when the ellipsis constant is encountered and can be avoided. A line of code consisting of an ellipsis is unnecessary if there is a docstring on the preceding line or if there is a statement in the same scope.r   Únodeúnodes.ConstÚreturnÚNonec                ót  — |                      ¦   «         dk    r›t          |j        t          j        ¦  «        r~t          |j        j        t          j        t          j        f¦  «        r|j        j        j        s"t          |j        j        j	        ¦  «        dk    r|  
                    d|¬¦  «         dS dS dS dS )a_  Check if the ellipsis constant is used unnecessarily.

        Emits a warning when:
         - A line consisting of an ellipsis is preceded by a docstring.
         - A statement exists in the same scope as the ellipsis.
           For example: A function consisting of an ellipsis followed by a
           return statement on the next line.
        zbuiltins.Ellipsisé   r   )r   N)ÚpytypeÚ
isinstanceÚparentr   ÚExprÚClassDefÚFunctionDefÚdoc_nodeÚlenÚbodyÚadd_message)Úselfr   s     úT/var/www/piapp/venv/lib/python3.11/site-packages/pylint/checkers/ellipsis_checker.pyÚvisit_constzEllipsisChecker.visit_const!   s¸   € ð �KŠK‰MŒMÐ0Ò0Ð0Ý˜4œ;­¬
Ñ3Ô3ð 1õ ˜tœ{Ô1µE´NÅEÔDUÐ3VÑWÔWð	 1ð
 œÔ*Ô3ð 1õ �t”{Ô)Ô.Ñ/Ô/°!Ò3Ð3ð ×ÒÐ3¸$ÐÑ?Ô?Ð?Ð?Ð?ð 1Ð0Ð0Ð0ð 4Ð3ó    N)r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__ÚnameÚmsgsr   r    © r!   r   r
   r
      s[   € € € € € Ø!€Dàð 
ð	€Dð  ÐÐ 6Ñ7Ô7ð@ð @ð @ñ 8Ô7ð@ð @ð @r!   r
   Úlinterr   r   r   c                óJ   — |                       t          | ¦  «        ¦  «         d S )N)Úregister_checkerr
   )r(   s    r   Úregisterr+   9   s$   € Ø
×Ò�O¨FÑ3Ô3Ñ4Ô4Ð4Ð4Ð4r!   N)r(   r   r   r   )Ú__doc__Ú
__future__r   Útypingr   Úastroidr   Úpylint.checkersr   Úpylint.checkers.utilsr   Úpylint.lintr   r
   r+   r'   r!   r   ú<module>r3      sÒ   ðð
 (Ð 'à "Ð "Ð "Ð "Ð "Ð "à  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð à 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø <Ð <Ð <Ð <Ð <Ð <àð %Ø$Ð$Ð$Ð$Ð$Ð$ð"@ð "@ð "@ð "@ð "@�kñ "@ô "@ð "@ðJ5ð 5ð 5ð 5ð 5ð 5r!   