AlkantarClanX12

Your IP : 18.116.52.43


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

�

�܋fJ���dZddlZddlZddlZddlmZddlmZddlmZddlmZddlm	Z	ddl
mZdd	l
mZej
e��Zejd
���ded
eeefd���ZGd�de��ZdS)z3Contains the Violation error class used internally.�N)�Dict)�Match)�
NamedTuple)�Optional)�Set)�defaults)�utilsi)�maxsize�
physical_line�returnc�@�tj�|��S)N)r�NOQA_INLINE_REGEXP�search)rs �a/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/flake8/violation.py�
_find_noqars���&�-�-�m�<�<�<�c��eZdZUdZeed<eed<eed<eed<eed<eeed<ded	efd
�Z	de
eeefd	efd�Zd
S)�	Violationz2Class representing a violation reported by Flake8.�code�filename�line_number�
column_number�textr�disable_noqarc�B�|j}|rdS|�tj|j|j��}t|��}|�t�d|��dS|���d}|�t�d|��dSttj|����}|j|vs'|j�
t|����rt�d||��dSt�d||��dS)	z�Determine if a comment has been added to ignore this line.

        :param disable_noqa:
            Whether or not users have provided ``--disable-noqa``.
        :returns:
            True if error is ignored in-line, False otherwise.
        FNz%r is not inline ignored�codesz%%r is ignored by a blanket ``# noqa``Tz5%r is ignored specifically inline with ``# noqa: %s``z,%r is not ignored inline with ``# noqa: %s``)r�	linecache�getlinerrr�LOG�debug�	groupdict�setr	�parse_comma_separated_listr�
startswith�tuple)�selfrr�
noqa_match�	codes_strrs      r�is_inline_ignoredzViolation.is_inline_ignored!s#���*�
��	��5�� �%�-�d�m�T�=M�N�N�M��
�.�.�
����I�I�0�$�7�7�7��5��(�(�*�*�7�3�	����I�I�=�t�D�D�D��4��E�4�Y�?�?�@�@���9������!5�!5�e�E�l�l�!C�!C���I�I�G���
�
�
�
�4��	�	�:�D�)�	
�	
�	
��ur�diffc�X�|sdS|�|j��}|sdS|j|vS)a{Determine if the violation is included in a diff's line ranges.

        This function relies on the parsed data added via
        :meth:`~StyleGuide.add_diff_ranges`. If that has not been called and
        we are not evaluating files in a diff, then this will always return
        True. If there are diff ranges, then this will return True if the
        line number in the error falls inside one of the ranges for the file
        (and assuming the file is part of the diff data). If there are diff
        ranges, this will return False if the file is not part of the diff
        data or the line number of the error is not in any of the ranges of
        the diff.

        :returns:
            True if there is no diff or if the error is in the diff's line
            number ranges. False if the error's line number falls outside
            the diff's line number ranges.
        TF)�getrr)r&r*�line_numberss   r�is_inzViolation.is_inHsA��$�	��4��x�x��
�.�.���	��5���<�/�/rN)
�__name__�
__module__�__qualname__�__doc__�str�__annotations__�intr�boolr)rrr.�rrrrs��������<�<�

�I�I�I��M�M�M���������

�I�I�I��C�=� � � �%�d�%�t�%�%�%�%�N0�$�s�C��H�}�-�0�$�0�0�0�0�0�0rr)r2�	functoolsr�logging�typingrrrrr�flake8rr	�	getLoggerr/r�	lru_cacher3rrr7rr�<module>r>sD��9�9��������������������������������������������������������g���!�!�����S�!�!�!�=�c�=�h�u�S�z�&:�=�=�=�"�!�=�P0�P0�P0�P0�P0�
�P0�P0�P0�P0�P0r