
    yIf                        d Z ddlmZ ddlZddlZddlZddlmZ ddlmZ ddl	m
Z
 ddl	mZ  ej        e          Z ej        d	          dd            Z G d de          ZdS )z3Contains the Violation error class used internally.    )annotationsN)Match)
NamedTuple)defaults)utilsi   )maxsizephysical_linestrreturnMatch[str] | Nonec                @    t           j                            |           S )N)r   NOQA_INLINE_REGEXPsearch)r	   s    D/var/www/piapp/venv/lib/python3.11/site-packages/flake8/violation.py
_find_noqar      s    &--m<<<    c                  X    e Zd ZU dZded<   ded<   ded<   ded<   ded<   d	ed
<   ddZdS )	Violationz2Class representing a violation reported by Flake8.r
   codefilenameintline_numbercolumn_numbertextz
str | Noner	   disable_noqaboolr   c                B   | j         }|rdS |t          j        | j        | j                  }t          |          }|t                              d|            dS |                                d         }|t                              d|            dS t          t          j        |                    }| j        |v s'| j                            t          |                    rt                              d| |           dS t                              d| |           dS )	zDetermine 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getliner   r   r   LOGdebug	groupdictsetr   parse_comma_separated_listr   
startswithtuple)selfr   r	   
noqa_match	codes_strr   s         r   is_inline_ignoredzViolation.is_inline_ignored    s#    * 	5 %-dmT=MNNM..
II0$7775((**73	II=tDDD4E4Y??@@9!5!5eEll!C!CIIG  
 4		:D)	
 	
 	
 ur   N)r   r   r   r   )__name__
__module____qualname____doc____annotations__r+    r   r   r   r      so         <<IIIMMMIII% % % % % %r   r   )r	   r
   r   r   )r/   
__future__r   	functoolsr   loggingtypingr   r   flake8r   r   	getLoggerr,   r!   	lru_cacher   r   r1   r   r   <module>r9      s    9 9 " " " " " "                                  g!! S!!!= = = "!=/ / / / /
 / / / / /r   