Debian Codegraph @

Tools/build/.ruff.toml

raw
1 extend = "../../.ruff.toml" # Inherit the project-wide settings
2
3 [per-file-target-version]
4 "deepfreeze.py" = "py311" # requires `code.co_exceptiontable`
5 "stable_abi.py" = "py311" # requires 'tomllib'
6
7 [format]
8 preview = true
9 docstring-code-format = true
10
11 [lint]
12 select = [
13 "C4", # flake8-comprehensions
14 "E", # pycodestyle
15 "F", # pyflakes
16 "I", # isort
17 "ISC", # flake8-implicit-str-concat
18 "LOG", # flake8-logging
19 "PGH", # pygrep-hooks
20 "PT", # flake8-pytest-style
21 "PYI", # flake8-pyi
22 "RUF100", # Ban unused `# noqa` comments
23 "UP", # pyupgrade
24 "W", # pycodestyle
25 "YTT", # flake8-2020
26 ]
27 ignore = [
28 "E501", # Line too long
29 "F541", # f-string without any placeholders
30 "PYI024", # Use `typing.NamedTuple` instead of `collections.namedtuple`
31 "PYI025", # Use `from collections.abc import Set as AbstractSet`
32 ]
33
34 [lint.per-file-ignores]
35 "{check_extension_modules,freeze_modules}.py" = [
36 "UP031", # Use format specifiers instead of percent format
37 ]
38 "generate_{re_casefix,sre_constants,token}.py" = [
39 "UP031", # Use format specifiers instead of percent format
40 ]