Skip to content

Commit 3a833c6

Browse files
dev: report pyproject.toml formatting instead of rewriting it
The session is a gate, so it should say whether the file is formatted. Rewriting is left to whoever is editing, which is how the other checks in this repository behave under --check.
1 parent 7aa7d4e commit 3a833c6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎noxfile.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ def codespell(session: nox.Session) -> None:
238238

239239
@nox.session(tags=["check"], allow_parallel=True)
240240
def pyproject(session: nox.Session) -> None:
241-
"""Format pyproject.toml with taplo."""
241+
"""Check that pyproject.toml is formatted, leaving the rewrite to the contributor."""
242242
session.install("--group", "lint")
243-
session.run("taplo", "format", *(["--check"] if _check_only(session) else []), "pyproject.toml")
243+
session.run("taplo", "format", "--check", "pyproject.toml")
244244

245245

246246
@nox.session(tags=["check"], allow_parallel=True)

0 commit comments

Comments
 (0)