diff options
| author | stuppie | 2026-09-03 18:23:47 -0600 |
|---|---|---|
| committer | stuppie | 2026-09-03 18:23:47 -0600 |
| commit | 1d2b9e48c2e0b6da9385364fe57d51cd30bd64a5 (patch) | |
| tree | f890a33adf4b8947ce2c05a57a0484c7829384e0 | |
| parent | 131c73789ac97a577cab9f19813fea28869d8992 (diff) | |
| download | generalresearch-1d2b9e48c2e0b6da9385364fe57d51cd30bd64a5.tar.gz generalresearch-1d2b9e48c2e0b6da9385364fe57d51cd30bd64a5.zip | |
fix more pydantic model rebuild import errors
| -rw-r--r-- | generalresearch/models/events.py | 19 | ||||
| -rw-r--r-- | generalresearch/models/thl/ipinfo.py | 11 | ||||
| -rw-r--r-- | generalresearch/models/thl/user_iphistory.py | 15 | ||||
| -rw-r--r-- | generalresearch/models/thl/user_streak.py | 5 | ||||
| -rw-r--r-- | generalresearch/models/thl/userhealth.py | 5 |
5 files changed, 24 insertions, 31 deletions
diff --git a/generalresearch/models/events.py b/generalresearch/models/events.py index 7014d22..d7dbfd6 100644 --- a/generalresearch/models/events.py +++ b/generalresearch/models/events.py @@ -1,6 +1,6 @@ from datetime import UTC, datetime, timedelta from enum import StrEnum -from typing import TYPE_CHECKING, Annotated, Literal +from typing import Annotated, Literal from uuid import uuid4 from pydantic import ( @@ -18,16 +18,13 @@ from generalresearch.models.custom_types import ( CountryISOLike, UUIDStr, ) - -if TYPE_CHECKING: - - from generalresearch.models.definitions import Source - from generalresearch.models.thl.definitions import ( - SessionStatusCode2, - Status, - StatusCode1, - WallStatusCode2, - ) +from generalresearch.models.definitions import Source +from generalresearch.models.thl.definitions import ( + SessionStatusCode2, + Status, + StatusCode1, + WallStatusCode2, +) class MessageKind(StrEnum): diff --git a/generalresearch/models/thl/ipinfo.py b/generalresearch/models/thl/ipinfo.py index 8322c7d..8fbae4c 100644 --- a/generalresearch/models/thl/ipinfo.py +++ b/generalresearch/models/thl/ipinfo.py @@ -15,13 +15,14 @@ from pydantic import ( field_validator, ) +from generalresearch.models.custom_types import ( + AwareDatetimeISO, + CountryISOLike, + IPvAnyAddressStr, +) + if TYPE_CHECKING: from generalresearch.managers.thl.ipinfo import IPGeonameManager - from generalresearch.models.custom_types import ( - AwareDatetimeISO, - CountryISOLike, - IPvAnyAddressStr, - ) fake = Faker() diff --git a/generalresearch/models/thl/user_iphistory.py b/generalresearch/models/thl/user_iphistory.py index 0d25322..a7eadf4 100644 --- a/generalresearch/models/thl/user_iphistory.py +++ b/generalresearch/models/thl/user_iphistory.py @@ -13,18 +13,17 @@ from pydantic import ( field_validator, ) -from generalresearch.models.thl.ipinfo import normalize_ip +from generalresearch.models.custom_types import ( + AwareDatetimeISO, + CountryISOLike, + IPvAnyAddressStr, +) +from generalresearch.models.thl.ipinfo import GeoIPInformation, normalize_ip +from generalresearch.models.thl.user import User if TYPE_CHECKING: from grip_client.enums import AccessType - from generalresearch.models.custom_types import ( - AwareDatetimeISO, - CountryISOLike, - IPvAnyAddressStr, - ) - from generalresearch.models.thl.ipinfo import GeoIPInformation - from generalresearch.models.thl.user import User from generalresearch.pg_helper import PostgresConfig from generalresearch.redis_helper import RedisConfig diff --git a/generalresearch/models/thl/user_streak.py b/generalresearch/models/thl/user_streak.py index 4c09d13..9105b27 100644 --- a/generalresearch/models/thl/user_streak.py +++ b/generalresearch/models/thl/user_streak.py @@ -2,7 +2,6 @@ from __future__ import annotations from datetime import date, datetime, timedelta from enum import StrEnum -from typing import TYPE_CHECKING from zoneinfo import ZoneInfo import pandas as pd @@ -20,9 +19,7 @@ from pydantic.json_schema import SkipJsonSchema from generalresearch.managers.leaderboard import country_timezone from generalresearch.models.definitions import MAX_INT32 - -if TYPE_CHECKING: - from generalresearch.models.thl.locales import CountryISO +from generalresearch.models.thl.locales import CountryISO class StreakPeriod(StrEnum): diff --git a/generalresearch/models/thl/userhealth.py b/generalresearch/models/thl/userhealth.py index e751c2b..8535dfa 100644 --- a/generalresearch/models/thl/userhealth.py +++ b/generalresearch/models/thl/userhealth.py @@ -2,12 +2,11 @@ from __future__ import annotations from datetime import UTC, datetime from enum import Enum -from typing import TYPE_CHECKING, Any, Self +from typing import Any, Self from pydantic import BaseModel, Field, NonNegativeFloat, PositiveInt -if TYPE_CHECKING: - from generalresearch.models.custom_types import AwareDatetimeISO +from generalresearch.models.custom_types import AwareDatetimeISO class AuditLogLevel(int, Enum): |
