From 20cd174a1fd076cc8f5cd99846f0c4c7c4669d3a Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 19 Oct 2026 09:58:00 +0200 Subject: [PATCH] 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) --- src/pkgmgr/actions/release/files/changelog_md.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pkgmgr/actions/release/files/changelog_md.py b/src/pkgmgr/actions/release/files/changelog_md.py index 2922f93..f1f5e36 100644 --- a/src/pkgmgr/actions/release/files/changelog_md.py +++ b/src/pkgmgr/actions/release/files/changelog_md.py @@ -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}"