Watch
0
0
Fork
You've already forked hyperhive
0

treefmt covers python with ruff-format and ruff-check, ruff in the dev shell

This commit is contained in:
atlas 2026-11-11 21:49:21 +01:00 • committed by mara
commit f2e735a98f
2 changed files with 8 additions and 17 deletions

View file

@ -129,9 +129,10 @@ Nix interpolation. Commands the script runs in the VM find their binaries on the
node's `environment.systemPackages`. Build-time values (socket path, forge
domain, store paths) arrive as `FULL_SETUP_*` environment variables, set in
`nix/vm-tests/full-setup.nix` through `overrideTestDerivation`. To add a value,
set one there and read it with `os.environ` in the script. The `ruff (vm-tests)`
job checks and format-checks `nix/vm-tests/*.py`; `nix/vm-tests/ruff.toml` names
the globals the test driver provides.
set one there and read it with `os.environ` in the script. `nix fmt` formats and lints the Python (treefmt's
`ruff-format` and `ruff-check`, which fixes what it can), and the `formatting`
flake check fails on a file `nix fmt` would change. `nix/vm-tests/ruff.toml`
names the globals the test driver provides.
## Configuration reference

View file

@ -458,7 +458,7 @@ nix fmt # treefmt — authoritative, NOT bare cargo fmt
`nix fmt` (treefmt) is the formatter CI gates on; bare `cargo fmt`
misses the non-rust files treefmt also covers, so always run `nix
fmt` before pushing.
fmt` before pushing. It also formats and lints Python with ruff.
**Clippy discipline — never add `#[allow(clippy::…)]`.** All lints are
CI-fatal at `-D warnings` (pedantic included); every warning that fires