From 529bba2d0ee6c57d142b067b07a70cf3c047c9e5 Mon Sep 17 00:00:00 2001 From: gitricko Date: Wed, 20 May 2026 14:52:18 -0400 Subject: [PATCH 1/2] fix: update datetime timezone reference to maintain compatibility with older Python versions --- mnemon/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mnemon/__init__.py b/mnemon/__init__.py index dfe230c..4989c09 100644 --- a/mnemon/__init__.py +++ b/mnemon/__init__.py @@ -21,6 +21,7 @@ import threading import time from datetime import datetime +from datetime import timezone from pathlib import Path from typing import Any @@ -247,7 +248,7 @@ def _remember_and_index(self, text: str, **kwargs) -> str | None: idx = {} idx.setdefault("ids", {}) idx["ids"][iid] = { - "ts": datetime.now(datetime.UTC).isoformat(), + "ts": datetime.now(timezone.utc).isoformat(), "text_snippet": text[:80], "store": self._store, "session": self._session_id, From aabd7fcd1b17c7b77e2104d8afca22e633124d2b Mon Sep 17 00:00:00 2001 From: intricko <37886057+intricko@users.noreply.github.com> Date: Wed, 20 May 2026 15:15:00 -0400 Subject: [PATCH 2/2] fix: consolidate datetime imports and update ruff ignore rules (#10) --- mnemon/__init__.py | 3 +-- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mnemon/__init__.py b/mnemon/__init__.py index 4989c09..f7570f2 100644 --- a/mnemon/__init__.py +++ b/mnemon/__init__.py @@ -20,8 +20,7 @@ import subprocess import threading import time -from datetime import datetime -from datetime import timezone +from datetime import datetime, timezone from pathlib import Path from typing import Any diff --git a/pyproject.toml b/pyproject.toml index eeac034..a3d6fd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ target-version = "py311" [tool.ruff.lint] select = ["E", "F", "I", "UP", "B"] -ignore = ["E501"] +ignore = ["E501", "UP017"] [tool.coverage.run] source = ["mnemon"]