module documentation

Undocumented

Class PragmaRepresenter Undocumented
Exception InvalidPragmaError Thrown in case the pragma is invalid.
Exception PragmaParserError A class for exceptions thrown by pragma_parser module.
Exception UnRecognizedOptionError Thrown in case the of a valid but unrecognized option.
Function emit_pragma_representer Undocumented
Function parse_pragma Undocumented
Constant ALL_KEYWORDS Undocumented
Constant ATOMIC_KEYWORDS Undocumented
Constant MESSAGE_KEYWORDS Undocumented
Constant OPTION_PO Undocumented
Constant OPTION_RGX Undocumented
Constant TOK_REGEX Undocumented
Constant TOKEN_SPECIFICATION Undocumented
def emit_pragma_representer(action: str, messages: list[str]) -> PragmaRepresenter: (source)

Undocumented

def parse_pragma(pylint_pragma: str) -> Generator[PragmaRepresenter, None, None]: (source)

Undocumented

ALL_KEYWORDS = (source)

Undocumented

Value
"""|""".join(sorted(ATOMIC_KEYWORDS|MESSAGE_KEYWORDS, key=len, reverse=True))
ATOMIC_KEYWORDS = (source)

Undocumented

Value
frozenset(('disable-all', 'skip-file'))
MESSAGE_KEYWORDS = (source)

Undocumented

Value
frozenset(('disable-next', 'disable-msg', 'enable-msg', 'disable', 'enable'))
OPTION_PO = (source)

Undocumented

Value
re.compile(OPTION_RGX, re.VERBOSE)
OPTION_RGX: str = (source)

Undocumented

Value
'''
    (?:^\\s*\\#.*|\\s*|               # Comment line, or whitespaces,
       \\s*\\#.*(?=\\#.*?\\bpylint:))  # or a beginning of an inline comment
                                   # followed by "pylint:" pragma
    (\\#                            # Beginning of comment
    .*?                            # Anything (as little as possible)
    \\bpylint:                      # pylint word and column
...
TOK_REGEX = (source)

Undocumented

Value
"""|""".join((f'(?P<{token_name:s}>{token_rgx:s})' for token_name, token_rgx in
    TOKEN_SPECIFICATION))
TOKEN_SPECIFICATION = (source)

Undocumented

Value
[('KEYWORD', f"""\\b({ALL_KEYWORDS:s})\\b"""),
 ('MESSAGE_STRING', '[0-9A-Za-z\\-\\_]{2,}'),
 ('ASSIGN', '='),
 ('MESSAGE_NUMBER', '[CREIWF]{1}\\d*')]