feat: Upgrade to Python 3.12 (#4675)

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Michael Genson
2024-12-04 22:31:26 -06:00
committed by GitHub
parent 0e6a40e210
commit 87504fbb05
43 changed files with 128 additions and 163 deletions

View File

@@ -6,7 +6,7 @@ Create Date: 2024-03-18 02:28:15.896959
"""
from datetime import datetime, timezone
from datetime import UTC, datetime
from textwrap import dedent
from typing import Any
from uuid import uuid4
@@ -34,7 +34,7 @@ def new_user_rating(user_id: Any, recipe_id: Any, rating: float | None = None, i
else:
id = "%.32x" % uuid4().int # noqa: UP031
now = datetime.now(timezone.utc).isoformat()
now = datetime.now(UTC).isoformat()
return {
"id": id,
"user_id": user_id,

View File

@@ -6,7 +6,7 @@ Create Date: 2024-07-12 16:16:29.973929
"""
from datetime import datetime, timezone
from datetime import UTC, datetime
from textwrap import dedent
from typing import Any
from uuid import uuid4
@@ -89,7 +89,7 @@ def dedupe_cookbook_slugs():
def create_household(session: orm.Session, group_id: str) -> str:
# create/insert household
household_id = generate_id()
timestamp = datetime.now(timezone.utc).isoformat()
timestamp = datetime.now(UTC).isoformat()
household_data = {
"id": household_id,
"name": settings.DEFAULT_HOUSEHOLD,