chore: apply cargo fmt to pyopenquant so lint-test goes green - #20
Merged
Conversation
The lint-test CI job runs `cargo fmt -- --check`, which has been failing on main because crates/pyopenquant/src/*.rs was never rustfmt-clean. Running stable `cargo fmt` reformats 19 files in that crate; the changes are purely mechanical (line reflow, trailing commas, closure bodies wrapped in braces) with no logic, dependency, or API changes. rustfmt.toml's nightly-only options (imports_granularity, group_imports, reorder_impl_items) still warn and are ignored on stable; that is unchanged and matches what CI runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011jWVczUsZvbLh41F7ejWqA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ci.yml'slint-testjob has been red onmainfor months — since at least8087122— becausecrates/pyopenquant/src/is not rustfmt-clean.cargo fmt -- --checkexited 1 with 1038 lines of diff.A permanently-red CI job is worse than no CI job: it trains everyone to ignore the signal. That is
part of how a failing
check:api-driftand 13 broken production redirects shipped unnoticed.What changed
cargo fmt, nothing else. 19 files, +305/−149, all undercrates/pyopenquant/src/. No othercrate needed formatting. No
Cargo.toml, nodocs-site/, nopython/, no.github/.Zero behaviour change — and it was checked, not assumed
and trailing commas).
cla,labeling,portfolio,sample_weights,synthetic_bt) were read hunkby hunk: all reflow, closure-brace wrapping, or exploded argument lists.
Verification
cargo fmt -- --check→ exit 1 · After: → exit 0. Real exit codes, no pipes.rustfmt.toml's three nightly-only options (imports_granularity,group_imports,reorder_impl_items) are left untouched — stable warns and ignores them, matching CI.One pre-existing note, not introduced here
A bare
cargo check --all-targetsfails locally with "Python interpreter version (3.14) is newerthan PyO3's maximum supported version (3.13)" from the pyo3 build script, before any project source
compiles. With
PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1it exits 0 and checks cleanly — and CI alreadysets that variable, so CI is unaffected.