Debian Codegraph @

.ruff.toml

raw
1 target-version = "py39" # Pin Ruff to Python 3.9
2 line-length = 88
3 output-format = "full"
4
5 [format]
6 quote-style = "single"
7 docstring-code-format = true
8
9 [lint]
10 select = [
11 "ANN", # flake8-annotations
12 "ASYNC", # flake8-async
13 "B", # flake8-bugbear
14 "BLE", # flake8-blind-except
15 "C4", # flake8-comprehensions
16 "D", # pydocstyle
17 "D212", # Multi-line docstring summary should start at the first line
18 "D417", # Missing argument description in the docstring for `{definition}`: `{name}`
19 "DTZ", # flake8-datetimez
20 "E", # pycodestyle
21 "EM", # flake8-errmsg
22 "EXE", # flake8-executable
23 "F", # pyflakes
24 "FA", # flake8-future-annotations
25 "FIX", # flake8-fixme
26 "FLY", # flynt
27 "FURB", # refurb
28 "G", # flake8-logging-format
29 "I", # isort
30 "ICN", # flake8-import-conventions
31 "INT", # flake8-gettext
32 "ISC", # flake8-implicit-str-concat
33 "LOG", # flake8-logging
34 "N", # pep8-naming
35 "PERF", # perflint
36 "PGH", # pygrep-hooks
37 "PIE", # flake8-pie
38 "PLC", # pylint
39 "PLE", # pylint
40 "PLW", # pylint
41 "PT", # flake8-pytest-style
42 "PTH", # flake8-use-pathlib
43 "Q", # flake8-quotes
44 "RET", # flake8-return
45 "RSE", # flake8-raise
46 "RUF", # Ruff-specific rules
47 "S", # flake8-bandit
48 "SIM", # flake8-simplify
49 "SLF", # flake8-self
50 "SLOT", # flake8-slots
51 "T10", # flake8-debugger
52 "TC", # flake8-type-checking
53 "TD", # flake8-todos
54 "TID", # flake8-tidy-imports
55 "TRY", # tryceratops
56 "UP", # pyupgrade
57 "W", # pycodestyle
58 "W", # pycodestyle
59 "YTT", # flake8-2020
60 ]
61 ignore = [
62 # pydocstyle
63 "D100", # Missing docstring in public module
64 "D102", # Missing docstring in public method
65 "D103", # Missing docstring in public function
66 "D104", # Missing docstring in public package
67 "D107", # Missing docstring in `__init__`
68 "D400", # First line should end with a period
69 # pycodestyle
70 "E501", # Ignore line length errors (we use auto-formatting)
71 ]
72
73 [lint.per-file-ignores]
74 "utils/convert_attestations.py" = [
75 "ANN", # utilities don't need annotations
76 "S101", # allow use of assert
77 "T201", # whitelist ``print`` for stdout messages
78 ]
79
80 "tests/*" = [
81 "ANN", # tests don't need annotations
82 "S101", # allow use of assert
83 "SLF001", # allow private member access
84 ]
85
86 [lint.flake8-quotes]
87 inline-quotes = "single"
88
89 [lint.flake8-type-checking]
90 exempt-modules = []
91 strict = true
92
93 [lint.isort]
94 forced-separate = [
95 "tests",
96 ]
97 required-imports = [
98 "from __future__ import annotations",
99 ]
100
101 [lint.pydocstyle]
102 convention = "pep257"
103 ignore-decorators = ["typing.overload"]
104 ignore-var-parameters = true