♻️ refactor(project): apply the house style - #459
Merged
Conversation
Drops Any and object for a TomlValue the settings arrive as, which took mypy from 18 errors to none and left every suppression with a reason. The version and inputs help named pyproject-fmt where the formatter names itself, so tox-toml-fmt printed the wrong tool and file. Removes a README helper nothing called, two single-use wrappers, and the private names a test reached for; the escapes it asserts are spelled out so a change to them fails it.
Two sixty-line match chains over ruff and uv key names become the sorted static slices the same modules already keep such data in, which drops the clippy suppression they carried rather than explain it. The suppressions left name why they stand, and the pyo3 signatures wrap inside the width the rest of the file holds to.
Removes the blank-stripping, comment-scanning and member-trivia logic each written twice, the index no caller read, and the closure that only forwarded its arguments. Names the widths that had to track a literal elsewhere in the file, and imports the toml_doc types the same modules were already importing their siblings from.
Expose stable parser and backend boundaries so tests and documentation no longer depend on private names. Keep configuration parsing explicit and remove redundant extension tests already covered through public commands.
Remove repeated test helpers and lint exemptions. Keep Python-facing settings construction explicit while preserving keyword validation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Codecov requires 100% of LLVM regions. Cargo llvm-cov accepts a line after one region runs. Exercise each missing-key and extraction error path in both settings constructors. Treat Rust string dictionary lookups as infallible to match the type invariant.
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.
House-style drift spanned 137 tracked files across the Python and Rust workspace, from broad APIs and duplicate tests to stale contributor guidance. Issue templates needed the same pass.
The refactor narrows public Python APIs, consolidates duplicate test scaffolding, shortens Rust data paths, and replaces partial assertions with whole-result checks without changing formatter output. Code comments and user-facing text use direct language.
Users get corrected documentation links and current workspace commands. One source generates both package READMEs, and removing the missing tox environment reference lets contributors run the repository fix command.