Hacked By AnonymousFox

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

�

�܋f{���dZddlmZddlZddlZddlmZddlmZddl	m
Z
mZddlm
Z
erddlmZGd	�d
e
��ZGd�dee
��Zdd�ZdS)zICheck source code is ascii only or has an encoding declaration (PEP 263).�)�annotationsN)�
TYPE_CHECKING)�nodes)�BaseRawFileChecker�BaseTokenChecker)�ManagedMessage)�PyLinterc�:�eZdZdZdZddiZdZdd�Zdd
�Zdd
�Z	dS)�ByIdManagedMessagesCheckerzIChecks for messages that are enabled or disabled by id instead of symbol.�
miscellaneous�I0023)�%s�use-symbolic-message-insteadz1Used when a message is enabled or disabled by id.��return�Nonec�B�|jj���dS�N)�linter�_by_id_managed_msgs�clear��selfs �e/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/checkers/misc.py�_clear_by_id_managed_msgsz4ByIdManagedMessagesChecker._clear_by_id_managed_msgs$s����'�-�-�/�/�/�/�/��list[ManagedMessage]c��|jjSr)rrrs r�_get_by_id_managed_msgsz2ByIdManagedMessagesChecker._get_by_id_managed_msgs's
���{�.�.r�node�nodes.Modulec���|���}|D]=\}}}}}||jkr*|rdnd}d|�d|�d|�d�}	|�d||	����>|���d	S)
zHInspect the source file to find messages activated or deactivated by id.�disable�enable�'z' is cryptic: use '# pylint: �=z	' insteadr��line�argsN)r�name�add_messager)
rr �managed_msgs�mod_name�msgid�symbol�lineno�is_disabled�verb�txts
          r�process_modulez)ByIdManagedMessagesChecker.process_module*s����3�3�5�5��<H�	X�	X�8�H�e�V�V�[��4�9�$�$�$/�=�y�y�X��V�%�V�V�d�V�V�V�V�V�V��� � �!?�f�SV� �W�W�W���&�&�(�(�(�(�(rN�rr)rr�r r!rr)
�__name__�
__module__�__qualname__�__doc__r*�msgs�optionsrrr4rrrrrsq������S�S��D��
��D��G�0�0�0�0�/�/�/�/�)�)�)�)�)�)rrc�l��eZdZdZdZddiZddddd	d
�fddd
ddd�ffZd"�fd�Zd#d�Zd$d�Z	d%d!�Z
�xZS)&�EncodingCheckerz}BaseChecker for encoding issues.

    Checks for:
    * warning notes in the code like FIXME, XXX
    * encoding issues.
    r�W0511)r�fixmez5Used when a warning note as FIXME or XXX is detected.�notes�csvz<comma separated values>)�FIXME�XXX�TODOzAList of note tags to take in consideration, separated by a comma.)�type�metavar�default�helpz	notes-rgx�stringz<regexp>z9Regular expression of note tags to take in consideration.�)rFrGrIrHrrc�L��t�����d�d�|jjjD����}|jjjrd|�d|jjj�d�}nd|�d�}tj|tj	��|_
dS)N�|c3�>K�|]}tj|��V��dSr)�re�escape)�.0�notes  r�	<genexpr>z'EncodingChecker.open.<locals>.<genexpr>cs*����N�N�T���4���N�N�N�N�N�Nrz#\s*(z)(?=(:|\s|\Z)))�super�open�joinr�configrA�	notes_rgxrO�compile�I�_fixme_pattern)rrA�regex_string�	__class__s   �rrUzEncodingChecker.open`s����
�����������N�N�T�[�5G�5M�N�N�N�N�N���;��'�	:�X�E�X�X�D�K�,>�,H�X�X�X�L�L�9�E�9�9�9�L� �j��r�t�<�<����rr0�intr(�bytes�
file_encoding�str�
str | Nonec��	|�|��S#t$rYndt$rX|�d��r@dt	|��vr/|t	|��vrd|�d�}|�d||���YnwxYwdS)N�#�codingzCannot decode using encoding 'z', bad encodingzsyntax-errorr')�decode�UnicodeDecodeError�LookupError�
startswithrar+)rr0r(r`�msgs     r�_check_encodingzEncodingChecker._check_encodingks���	H��;�;�}�-�-�-��!�	�	�	��D��	H�	H�	H�����%�%�
H���D�	�	�)�)�!�S��Y�Y�.�.�U�}�U�U�U��� � ��f�3� �G�G�G���	H�����ts��
B�AB�Br r!c���|jr|jnd}|���5}t|��D]\}}|�|dz||��� 	ddd��dS#1swxYwYdS)z1Inspect the source file to find encoding problem.�ascii�N)r`�stream�	enumeraterk)rr �encodingror0r(s      rr4zEncodingChecker.process_module|s���)-�);�H�4�%�%���
�[�[�]�]�	A�f� )�&� 1� 1�
A�
A�����$�$�V�a�Z��x�@�@�@�@�
A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A����	A�	A�	A�	A�	A�	As�0A#�#A'�*A'�tokens�list[tokenize.TokenInfo]c�f�|jjjsdS|D]�}|jtjkr�|jdd����}|j�	d|�
��z��r2|�d|jddz||jd�����dS)z*Inspect the source to find fixme problems.Nrn�#r@r)�
col_offsetr)r()
rrWrArF�tokenize�COMMENTrJ�lstripr[�search�lowerr+�start)rrr�
token_info�comment_texts    r�process_tokenszEncodingChecker.process_tokens�s����{�!�'�	��F� �
	�
	�J���(�"2�2�2��%�,�Q�R�R�0�7�7�9�9�L��"�)�)�#��0B�0B�0D�0D�*D�E�E�
�� � ��)�/��2�Q�6�%�#�)�!�,�	!�����
	�
	rr5)r0r^r(r_r`rarrbr6)rrrsrr)r7r8r9r:r*r;r<rUrkr4r�
__classcell__)r]s@rr>r>5s�����������D��
��D�
��5�3�,�
�
�	
�
� �%�S��	
�
�	
��G�0	=�	=�	=�	=�	=�	=�����"A�A�A�A��������rr>rr	rrc��|�t|����|�t|����dSr)�register_checkerr>r)rs r�registerr��sA��
���O�F�3�3�4�4�4�
���6�v�>�>�?�?�?�?�?r)rr	rr)r:�
__future__rrOrw�typingr�astroidr�pylint.checkersrr�
pylint.typingr�pylint.lintr	rr>r�rrr�<module>r�s ��
P�O�"�"�"�"�"�"�	�	�	�	����� � � � � � �������@�@�@�@�@�@�@�@�(�(�(�(�(�(��%�$�$�$�$�$�$�)�)�)�)�)�!3�)�)�)�>]�]�]�]�]�&�(:�]�]�]�@@�@�@�@�@�@r

Hacked By AnonymousFox1.0, Coded By AnonymousFox