]>
crepu.dev Git - config.git/blob - djavu-asus/emacs/elpy/rpc-venv/lib/python3.11/site-packages/flake8/defaults.py
57abda11d117b8c97af359fb76a3579171033a84
1 """Constants that define defaults."""
2 from __future__
import annotations
18 IGNORE
= ("E121", "E123", "E126", "E226", "E24", "E704", "W503", "W504")
23 WHITESPACE
= frozenset(" \t")
25 STATISTIC_NAMES
= ("logical lines", "physical lines", "tokens")
27 NOQA_INLINE_REGEXP
= re
.compile(
28 # We're looking for items that look like this:
31 # ``# noqa: E123,W451,F921``
32 # ``# noqa:E123,W451,F921``
33 # ``# NoQA: E123,W451,F921``
34 # ``# NOQA: E123,W451,F921``
35 # ``# NOQA:E123,W451,F921``
36 # We do not want to capture the ``: `` that follows ``noqa``
37 # We do not care about the casing of ``noqa``
38 # We want a comma-separated list of errors
39 r
"# noqa(?::[\s]?(?P<codes>([A-Z]+[0-9]+(?:[,\s]+)?)+))?",
43 NOQA_FILE
= re
.compile(r
"\s*# flake8[:=]\s*noqa", re
.I
)
45 VALID_CODE_PREFIX
= re
.compile("^[A-Z]{1,3}[0-9]{0,3}$", re
.ASCII
)