fix(release): date changelog entries without a ruff-version-dependent noqa

ruff 0.16 flags date.today() (DTZ011) while 0.17 drops that rule from its defaults and flags the noqa as unused (RUF100), so CI's unpinned ruff failed lint-python. datetime.now().astimezone().date() yields the same local date and passes both, matching debian.py and rpm_changelog.py.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-10-19 09:58:00 +02:00
parent ae4bfb5965
commit 20cd174a1f

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
import os
import re
import sys
from datetime import date
from datetime import datetime
from .changelog_lint import (
ChangelogLintError,
@@ -69,7 +69,7 @@ def update_changelog(
missing) and above any existing release entries, so the result stays
markdown-lint-clean (MD041 first-line-h1, MD012 no-multiple-blanks).
"""
today = date.today().isoformat() # noqa: DTZ011 - changelog dates are local calendar dates
today = datetime.now().astimezone().date().isoformat()
def _entry_for(raw: str) -> tuple[str, str]:
body = transform_changelog_message(raw).strip() or f"Release {new_version}"