Skip to content

[pre-commit.ci] pre-commit autoupdate - #549

Merged
gaborbernat merged 2 commits into
mainfrom
pre-commit-ci-update-config
Sep 14, 2026
Merged

gaborbernat merged 2 commits into
mainfrom
pre-commit-ci-update-config

Conversation

@pre-commit-ci

@pre-commit-ci pre-commit-ci Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

updates:
- [github.com/tox-dev/pyproject-fmt: v2.29.3 → v2.29.4](tox-dev/pyproject-fmt@v2.29.3...v2.29.4)
- [github.com/astral-sh/ruff-pre-commit: v0.16.6 → v0.16.7](astral-sh/ruff-pre-commit@v0.16.6...v0.16.7)
- [github.com/zizmorcore/zizmor-pre-commit: v1.30.0 → v1.30.1](zizmorcore/zizmor-pre-commit@v1.30.0...v1.30.1)

@gaborbernat gaborbernat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaborbernat
gaborbernat merged commit 5921065 into main Sep 14, 2026
39 checks passed
@gaborbernat
gaborbernat deleted the pre-commit-ci-update-config branch September 14, 2026 19:32
gaborbernat added a commit that referenced this pull request Sep 18, 2026
Every release commit leaves `docs/changelog.rst` in a shape `docstrfmt`
disagrees with: towncrier's header overline is one character short of
what `docstrfmt -l 120` wants, and its line wrapping doesn't match
either. Nothing runs `docstrfmt` before that commit lands on `main`, so
the reformat shows up later as an unrelated diff in whichever PR
pre-commit.ci next touches. #549 and #550 each carry exactly that
reformat, with nothing to do with their actual change.

The fix runs the `docstrfmt` pre-commit hook against the generated
changelog in `prepare-release.yaml`, right after `towncrier build` and
before the release commit, so the formatting is already correct when it
lands. `pre-commit` reports a hook that rewrites a file as a failure, so
the step is allowed to fail without breaking the job.

Verified locally: replaying `towncrier build` plus this `docstrfmt` step
against the pre-#549 changelog produces output identical to what
pre-commit.ci fixed up afterward, and a dry-run release from current
`main` needs no follow-up reformat.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
gaborbernat added a commit to gaborbernat/platformdirs that referenced this pull request Sep 18, 2026
towncrier's header overline and line wrapping don't match docstrfmt's
120-column style, so every release commit left docs/changelog.rst in
a shape docstrfmt wanted to rewrite. Nothing ran docstrfmt before that
commit landed on main, so pre-commit.ci reformatted it on whichever PR
happened to touch the repo next, carrying an unrelated diff into that
PR's changes (tox-dev#549, tox-dev#550).

Running the docstrfmt hook on the generated changelog right after
towncrier build, before the release commit, fixes the formatting at
the source instead of downstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant