Repository navigation
Expand file tree
/
Copy pathruff.toml
More file actions
30 lines (26 loc) · 1.49 KB
/
Copy pathruff.toml
File metadata and controls
30 lines (26 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# ruff, as scripts/lint.sh runs it over every tracked .py file (#853). The
# version is pinned in scripts/requirements-lint.txt, which Dependabot bumps.
#
# ruff walks `.` and honours .gitignore, so the trees a workstation has and a
# CI checkout does not (.venv/, .claude/worktrees/, backups/) are never linted.
# The oldest python3 these scripts meet: ubuntu-latest in CI. The monitoring
# host runs newer, which is the direction that cannot break.
target-version = "py312"
# The column limit .yamllint.yaml already uses, so one number holds for the
# repository (#938). Measured against the scripts as they were: 88 and 120
# differ by about 650 lines of reformat, and 140 saves only 130 more.
line-length = 120
# `ruff format --check` in scripts/lint.sh holds the layout (#938). Quotes are
# ruff's default, double, because 94% of the string literals already were;
# "preserve" would have spared 16 lines of the first reformat.
[format]
# ruff 0.16 also formats Python fences inside Markdown, and walks all 155 .md
# files here to find none. A snippet in a runbook illustrates; it is not code
# this repository runs, so its spacing is not a reason for Lint to fail.
exclude = ["*.md"]
[lint]
# ruff's defaults, plus bugbear for the likely bugs and pyupgrade so the code
# reads as the Python it runs on. The defaults are the pinned version's, and
# they widen: 0.16 added FURB, PLW, SIM, C4, I, ISC and RUF to pyflakes and the
# pycodestyle errors, which is why a bump arrives as its own PR.
extend-select = ["B", "UP"]