You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lands the ruff half of the Python toolchain (plan \xc2\xa7B2).
Config: [tool.ruff] in //:pyproject.toml \xe2\x80\x94 line-length 100, target py314,
src = [meta, tools], select E/F/I/B/UP/SIM/RUF/S. Per-file ignores carve
out S603/S607 for meta/scripts (subprocess calls to first-party tools by
name) and S101/S105/S106/S108/S311 for tests.
Where ruff runs:
- Pre-commit: ruff-check --fix then ruff-format (fix order matters; check
re-sorts imports, format finishes).
- CI: new `ruff` job mirrors golangci-lint\xe2\x80\x99s shape, uses
astral-sh/ruff-action with version pinned alongside the Dockerfile ARG.
Added to build-and-test-per-target.needs to gate merge.
- Devcontainer: installed via uv tool install during image build.
UV_TOOL_DIR is forced to /usr/local/share/uv-tools so the root-owned
install is reachable by the vscode user.
- VS Code: charliermarsh.ruff in extensions.json + devcontainer.json;
settings.json sets ruff as the default Python formatter with
source.fixAll.ruff + source.organizeImports.ruff as save-time actions.
Renovate: new regex matcher for .github/workflows/*.yml picks up the
`version:` input under `# renovate: ...` (mirrors the Dockerfile pattern),
and a ruff packageRule groups both pins into one PR.
Existing meta/scripts/*.py reformatted by `ruff format` and the four real
findings fixed (SIM102 nested-if, two E501 long error messages, SIM115
NamedTemporaryFile-without-with). Test files\xe2\x80\x99 RUF005 fixed inline.
README: new ruff row in the CI checks table, ruff-check / ruff-format /
uv-lock-fresh rows in the pre-commit table, charliermarsh.ruff in the
recommended extensions, and a `ruff (diagnostics + format)` row in the
on-save table.
Copy file name to clipboardExpand all lines: .vscode/settings.json
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,14 @@
18
18
"prettier.proseWrap": "always",
19
19
"prettier.trailingComma": "all",
20
20
"python.languageServer": "Default",
21
+
"// Ruff format-on-save": "charliermarsh.ruff surfaces diagnostics inline; this block makes it the default Python formatter so `editor.formatOnSave` calls ruff format, and runs ruff check --fix + import-organize as save-time code actions. Config is read from `[tool.ruff]` in //:pyproject.toml — single source of truth shared with CI + pre-commit.",
22
+
"[python]": {
23
+
"editor.defaultFormatter": "charliermarsh.ruff",
24
+
"editor.codeActionsOnSave": {
25
+
"source.fixAll.ruff": "explicit",
26
+
"source.organizeImports.ruff": "explicit"
27
+
}
28
+
},
21
29
"// Task Manager favorites": "Pins the Bazel build/test tasks to the cnshenj.vscode-task-manager sidebar (recommended in the devcontainer; see devcontainer.json). Names must match the `label` fields in tasks.json. The `UnnaturalDesigns/Workspace/` prefix is Task Manager's own scoping convention.",
0 commit comments