Skip to content

♻️ refactor(project): apply the house style - #459

Merged
gaborbernat merged 10 commits into
tox-dev:mainfrom
gaborbernat:style-pass
Sep 2, 2026
Merged

♻️ refactor(project): apply the house style#459
gaborbernat merged 10 commits into
tox-dev:mainfrom
gaborbernat:style-pass

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

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.

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

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (32f9e33) to head (31d2980).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
Flag Coverage Δ
common 100.00% <100.00%> (ø)
pyproject-fmt 100.00% <100.00%> (ø)
toml-doc 100.00% <ø> (ø)
tox-rules 100.00% <100.00%> (ø)
tox-toml-fmt 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
common/src/arrays.rs 100.00% <100.00%> (ø)
common/src/build.rs 100.00% <100.00%> (ø)
common/src/disabled.rs 100.00% <100.00%> (ø)
common/src/group.rs 100.00% <100.00%> (ø)
common/src/layout.rs 100.00% <100.00%> (ø)
common/src/nesting.rs 100.00% <100.00%> (ø)
common/src/sections.rs 100.00% <100.00%> (ø)
common/src/settings.rs 100.00% <100.00%> (ø)
common/src/shape.rs 100.00% <ø> (ø)
common/src/spacing.rs 100.00% <100.00%> (ø)
... and 7 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request pyproject-fmt Related to pyproject-fmt rust Pull requests that update rust code tox-toml-fmt Related to tox-toml-fmt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant