:~IkRsdZddlZddlZddlZddlmZddlmZddlmZddlmZddlm Z ddl m Z dd l m Z ej eZejd d ed eeefdZGddeZdS)z3Contains the Violation error class used internally.N)Dict)Match) NamedTuple)Optional)Set)defaults)utilsi)maxsize physical_linereturnc@tj|S)N)rNOQA_INLINE_REGEXPsearch)r s /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/flake8/violation.py _find_noqars  & - -m < <<ceZdZUdZeed<eed<eed<eed<eed<eeed<ded efd Z d e ee efd efd Z d S) Violationz2Class representing a violation reported by Flake8.codefilename line_number column_numbertextr disable_noqar cB|j}|rdS|tj|j|j}t |}|t d|dS|d}|t d|dSttj |}|j |vs'|j t|rt d||dSt d||dS) 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 ignoredcodesz%%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 linecachegetlinerrrLOGdebug groupdictsetr parse_comma_separated_listr startswithtuple)selfrr noqa_match codes_strrs ris_inline_ignoredzViolation.is_inline_ignored!s#*  5  %-dmT=MNNM ..   II0$ 7 7 75((**73   II=t D D D4E4Y??@@ 9  !5!5eEll!C!C  IIG    4 :D)   urdiffcX|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 ris_inzViolation.is_inHsA$ 4xx ..  5<//rN) __name__ __module__ __qualname____doc__str__annotations__intrboolr)rrr.rrrrs<< IIIMMM IIIC=   %d%t%%%%N0$sCH}-0$000000rr)r2 functoolsrloggingtypingrrrrrflake8rr getLoggerr/r lru_cacher3rrr7rrr>sD99g!!S!!!=c=huSz&:==="!=P0P0P0P0P0 P0P0P0P0P0r