diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 65accd70..5c532fb5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ exclude: ^python/tests/__snapshots__/ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.8 + rev: v0.17.1 hooks: - id: ruff-check args: [--fix] - id: ruff-format - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.12.17 + rev: 0.13.1 hooks: - id: uv-lock diff --git a/modify_changelog.py b/modify_changelog.py index 7153ba2f..94790026 100644 --- a/modify_changelog.py +++ b/modify_changelog.py @@ -30,7 +30,7 @@ """ import argparse -import datetime +import datetime as dt import re import sys from pathlib import Path @@ -77,7 +77,7 @@ def find_unreleased_section(lines): def update_changelog_version(file_path: Path, new_version: str) -> None: """Update changelog for version bump - replaces UNRELEASED with versioned section.""" - today = datetime.datetime.now(tz=datetime.UTC).strftime("%Y-%m-%d") + today = dt.datetime.now(tz=dt.UTC).strftime("%Y-%m-%d") content = file_path.read_text() new_section = f"## UNRELEASED\n\n## {new_version} ({today})" content = content.replace("## UNRELEASED", new_section, 1)