From 4247447736722a547777da55411f9902b9af1379 Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Thu, 18 Dec 2025 08:00:28 +1300 Subject: [PATCH 1/2] Add `just autofix` and run formatters in autofix steps --- CONTRIBUTING.rst | 1 + justfile | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index a6852951..6cd5bafb 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -122,6 +122,7 @@ Before you push It's a good idea to run ``just full-check`` before getting a review. This will run linters, docs build and tests under every supported Python version. +You can automatically fix many lint errors using ``just autofix``. Benchmarking ============ diff --git a/justfile b/justfile index bc2b6602..ae850085 100644 --- a/justfile +++ b/justfile @@ -77,7 +77,7 @@ lint-python: @echo 'Running Import Linter...' @uv run lint-imports -# Lint Rust code using cargo fmt and clippy +# Lint Rust code using cargo fmt and clippy. [working-directory: 'rust'] [group('linting')] lint-rust: @@ -89,11 +89,19 @@ lint-rust: [group('linting')] autofix-rust: @cargo clippy --all-targets --all-features --fix --allow-staged --allow-dirty + @just format-rust -# Fix any ruff errors +# Fix any ruff errors. [group('linting')] autofix-python: @uv run ruff check --fix + @just format-python + +# Fix any lint errors. +[group('linting')] +autofix: + @just autofix-rust + @just autofix-python # Run linters. [group('linting')] From 4d7f9198b453a8b623e5a833497610aaa6de4e85 Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Thu, 18 Dec 2025 08:05:40 +1300 Subject: [PATCH 2/2] Mention separate `just autofix-*` commands in `CONTRIBUTING.md` --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 6cd5bafb..dd4d67ad 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -122,7 +122,7 @@ Before you push It's a good idea to run ``just full-check`` before getting a review. This will run linters, docs build and tests under every supported Python version. -You can automatically fix many lint errors using ``just autofix``. +You can automatically fix many lint errors using ``just autofix`` (or ``just autofix-python`` and ``just autofix-rust`` separately). Benchmarking ============