Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/pylint/extensions/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/pylint/extensions/__pycache__/emptystring.cpython-311.pyc

�

�܋f����dZddlmZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
erdd	lmZGd
�de	j��Zdd�ZdS)z'Looks for  comparisons to empty string.�)�annotationsN)�
TYPE_CHECKING)�nodes)�checkers)�utils)�HIGH)�PyLinterc�R�eZdZdZddiZdZejd��dd	���Zd
S)�CompareToEmptyStringChecker�compare-to-empty-string�C1901)z;"%s" can be simplified to "%s" as an empty string is falseyrz@Used when Pylint detects comparison to an empty string constant.��node�
nodes.Compare�return�Nonec�l�hd�}d|jfg}|�|j��t|��}t	tj|���}tt|��dz
��D]�}||}||dz}||dz}d}	|�|�||vr�+d}
tj
|��rd}	|���}
n*tj
|��rd}	|���}
|	r=|dvrd	|
��n|
}|�d
|���|f|t�����dS)a	Checks for comparisons to empty string.

        Most of the time you should use the fact that empty strings are false.
        An exception to this rule is when an empty string value is allowed in the program
        and has a different meaning than None!
        >�!=�is not�is�==���FNT>rrznot r)�argsr�
confidence)�left�extend�ops�iter�list�	itertools�chain�range�lenr�is_empty_str_literal�	as_string�add_messager)�selfr�
_operatorsr�iter_ops�ops_idx�op_1�op_2�op_3�error_detected�	node_name�
suggestions            �n/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/extensions/emptystring.py�
visit_comparez)CompareToEmptyStringChecker.visit_compare"sp��2�1�1�
�
8:�4�9�o�5F���
�
�4�8������9�9���9�?�H�-�.�.���S��X�X��\�*�*�	�	�G�(+�G��D��G�a�K�(�D�(+�G�a�K�(8�D�"�N��|�t�|�t�:�/E�/E���I��)�$�/�/�
-�!%�� �N�N�,�,�	�	��+�D�1�1�
-�!%�� �N�N�,�,�	��
�37�<�3G�3G�/�I�/�/�/�Y�
�� � �-��.�.�*�*�J�7��#�	!�����%	�	�N)rrrr)	�__name__�
__module__�__qualname__�name�msgs�optionsr�only_required_for_messagesr4rr5r3rrs]������$�D��
��D��G�%�U�%�&?�@�@�'�'�'�A�@�'�'�'r5r�linterr	rrc�J�|�t|����dS)N)�register_checkerr)r=s r3�registerr@Ms%��
���7��?�?�@�@�@�@�@r5)r=r	rr)�__doc__�
__future__rr"�typingr�astroidr�pylintr�pylint.checkersr�pylint.interfacesr�pylint.lintr	�BaseCheckerrr@rr5r3�<module>rJs���
.�-�"�"�"�"�"�"����� � � � � � �������������!�!�!�!�!�!�"�"�"�"�"�"��%�$�$�$�$�$�$�4�4�4�4�4�(�"6�4�4�4�nA�A�A�A�A�Ar5

Hacked By AnonymousFox1.0, Coded By AnonymousFox