Repository navigation
Adopt Google Python Style, Conventional Commits, and cleanporter - #7
Merged
Merged
Conversation
Wire cleanporter 0.6.0 into the locked environment, pyproject config, pre-commit and `make fmt`; the import rewrite itself follows in the next commits. - pinned to the local stand-in git source at e53776c, the commit carrying the PEP 695 type-alias fix; the upstream 0.6.0 release is pending, so the source is swapped to the GitHub URL + tag once it is cut - the lint gate line and treat_unresolved_as_error land together with the import rewrite in the following commits, so every intermediate commit stays green; check mode currently reports 385 CP001 / 4 CP002 / 2 CP003 findings - the fmt recipe runs the fixers in the exit-code-robust order: ruff format first and last, ruff check --fix --exit-zero in between, and cleanporter --fix under `-` because it exits 1 whenever anything remains it will not rewrite - golden cases, marimo notebooks and tests/corpus.py are exempt: pinned compiler output, notebook format owned by marimo, and golden test data whose from-imports deliberately exercise the supported subset
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.
Adopt Google Python Style, Conventional Commits, and cleanporter
What
Adopts the repository conventions end to end and reorganizes the test
suite to match them. Four phases, 17 commits, each green on
make check:(compilerla/conventional-pre-commit v4.4.0, the 11 standard types,
old areas become scopes), AGENTS.md rule with the old→new mapping,
and a PR commit-subject check in CI.
(inspectability, closures-and-helpers, error paths dissolved into
per-module suites), the perf/fuzz/differential suites move into
their level folders, every reference updated. Zero tests lost:
956 → 970 collected (the layering non-blindness tests are new),
862 → 876 passed, coverage 96% throughout.
convention), N, ICN, TID252 and five zero-violation guards; all 251
relative imports switch to absolute (
ban-relative-imports = "all");62 docstring findings fixed by hand or autofix; one import per line
per §3.13. Single documented deviation: 100-column lines.
(upstream v0.6.0, which carries the PEP 695 type-alias fix this work
prompted: fix: bind PEP 695 type aliases as objects in the first-party layer cleanporter#10), fixer pre-commit hook,
exit-code-robust
make fmt, and themake lintgate withtreat_unresolved_as_error. The tree is module-only everywhereexcept six documented inline suppressions (load-bearing re-exports
and the optimize name collision) and the config-skipped golden test
data.
Review guide
The commits are small and scoped; the two big mechanical ones are
style: rewrite src imports to module-only formandstyle: rewrite test and script imports to module-only form(review with
git diff -M).Verification
make check: 970 collected, 876 passed, 94 skipped, 96% coverage(gate 95%)
make lint: ruff + the cleanporter gate — 84 files, 0 violations,0 unresolved; proven to fail on injected violations
make fuzz(5 seeds),make backends(93 passed),make lowest,make smoke,make docs: greengit diff main...HEAD --stat -- tests/golden/casesis empty; no--update-goldenwas ever runonly bare→module-qualified moves, the declared
*_modalias renames,and the six suppressions
make lintareinformational by design (inferred-root ranking), exit 0
Notes
v0.6.0tag; the localstand-in that drove development is gone.
generated code, the optimize-package cse/dce rename,
tests/unit/test_builtins.pynaming.