From 32217f51a71c0cb62befa229613cd84318684747 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 21:25:08 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.12 → v0.15.20](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.12...v0.15.20) - [github.com/crate-ci/typos: v1.46.1 → v1](https://github.com/crate-ci/typos/compare/v1.46.1...v1) - [github.com/astral-sh/uv-pre-commit: 0.11.13 → 0.11.26](https://github.com/astral-sh/uv-pre-commit/compare/0.11.13...0.11.26) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d83eef..1bb463d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.12 + rev: v0.15.20 hooks: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] @@ -19,7 +19,7 @@ repos: args: [--fail-under=24, localpost] - repo: https://github.com/crate-ci/typos - rev: v1.46.1 + rev: v1 hooks: - id: typos @@ -40,7 +40,7 @@ repos: - id: validate-pyproject - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.11.13 + rev: 0.11.26 hooks: - id: uv-lock From 9827eb64022fcdcf62b622153cd7274bf44329a5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 21:25:22 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- localpost/_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/localpost/_utils.py b/localpost/_utils.py index 1fe3f5b..132518a 100644 --- a/localpost/_utils.py +++ b/localpost/_utils.py @@ -202,10 +202,10 @@ def ensure_td(value: timedelta | str, /) -> timedelta: try: import pytimeparse2 # noqa: PLC0415 - use_dateutil = pytimeparse2.HAS_RELITIVE_TIMEDELTA + use_dateutil = pytimeparse2.HAS_RELATIVE_TIMEDELTA try: # Make sure to get timedelta, not relativedelta from dateutil - pytimeparse2.HAS_RELITIVE_TIMEDELTA = False + pytimeparse2.HAS_RELATIVE_TIMEDELTA = False # ``as_timedelta=True`` makes ``parse`` return ``timedelta`` # exclusively, but the stubs still expose ``int | float | timedelta``. result = cast("timedelta | None", pytimeparse2.parse(value, as_timedelta=True)) @@ -213,7 +213,7 @@ def ensure_td(value: timedelta | str, /) -> timedelta: raise ValueError(f"Invalid time period: {value!r}") return result finally: - pytimeparse2.HAS_RELITIVE_TIMEDELTA = use_dateutil + pytimeparse2.HAS_RELATIVE_TIMEDELTA = use_dateutil except ImportError: raise ValueError("pytimeparse2 package is required to parse a time period string") from None raise ValueError(f"Invalid time period: {value!r}")