From a28985790e0ac971754d834dfa5a66e5c6b7ddd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Thu, 5 Mar 2026 10:54:40 -0800 Subject: [PATCH] Fix release workflow docstrfmt compatibility The release workflow generated RST section headers that docstrfmt reformats: overline/underline was same width as title (docstrfmt wants +1), and the blank line after the underline was missing. Also fix _load_excluded_authors to use .yaml extension after the .github files were renamed in b10b8c5. --- .github/workflows/release.yaml | 4 ++-- docs/changelog.rst | 5 +++-- tasks/changelog.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e937008..501581b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,10 +81,10 @@ jobs: git config user.name "${{ github.actor }}" git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" header=" $VERSION ($(date -u +%Y-%m-%d))" - separator=$(printf '%0.s*' $(seq 1 ${#header})) + separator=$(printf '%0.s*' $(seq 1 $((${#header} + 1)))) { head -4 docs/changelog.rst - printf '%s\n%s\n%s\n%s\n\n' "$separator" "$header" "$separator" "$CHANGELOG" + printf '%s\n%s\n%s\n\n%s\n\n' "$separator" "$header" "$separator" "$CHANGELOG" tail -n +5 docs/changelog.rst } > docs/changelog.tmp mv docs/changelog.tmp docs/changelog.rst diff --git a/docs/changelog.rst b/docs/changelog.rst index c19134d..9c8049e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,9 +2,10 @@ Changelog ########### -******************* +******************** 4.9.4 (2026-03-05) -******************* +******************** + - [pre-commit.ci] pre-commit autoupdate :pr:`461` - by :user:`pre-commit-ci[bot]` - Update README.md - 📝 docs: add project logo to documentation :pr:`459` diff --git a/tasks/changelog.py b/tasks/changelog.py index 006268c..95f1348 100644 --- a/tasks/changelog.py +++ b/tasks/changelog.py @@ -61,7 +61,7 @@ def run() -> None: def _load_excluded_authors() -> set[str]: - release_config = ROOT / ".github" / "release.yml" + release_config = ROOT / ".github" / "release.yaml" if release_config.exists(): with release_config.open(encoding="utf-8") as file_handler: config = yaml.safe_load(file_handler)