diff options
| author | Max Nanis | 2026-08-21 17:19:41 -0700 |
|---|---|---|
| committer | Max Nanis | 2026-08-21 17:19:41 -0700 |
| commit | 6cf7ccbaa8306700e64ada19d6f99807743b2865 (patch) | |
| tree | 16ccde36ba2694b8c03bf8bdcee9cfcb2909046a /tests/models/custom_types | |
| parent | 352520a2bd4ac066e90587e44d8b818043407917 (diff) | |
| download | generalresearch-6cf7ccbaa8306700e64ada19d6f99807743b2865.tar.gz generalresearch-6cf7ccbaa8306700e64ada19d6f99807743b2865.zip | |
Ruff auto updates to 3.14
Diffstat (limited to 'tests/models/custom_types')
| -rw-r--r-- | tests/models/custom_types/test_aware_datetime.py | 6 | ||||
| -rw-r--r-- | tests/models/custom_types/test_dsn.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/models/custom_types/test_aware_datetime.py b/tests/models/custom_types/test_aware_datetime.py index 530142e..043fba0 100644 --- a/tests/models/custom_types/test_aware_datetime.py +++ b/tests/models/custom_types/test_aware_datetime.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from datetime import datetime, timezone +from datetime import UTC, datetime, timezone import pytest import pytz @@ -27,14 +27,14 @@ class TestAwareDatetimeISO: AwareDatetimeISOModel.model_validate_json(t.model_dump_json()) def test_dt(self): - dt = datetime(2023, 10, 10, 1, 1, 1, tzinfo=timezone.utc) + dt = datetime(2023, 10, 10, 1, 1, 1, tzinfo=UTC) t = AwareDatetimeISOModel(dt=dt, dt_optional=dt) AwareDatetimeISOModel.model_validate_json(t.model_dump_json()) t = AwareDatetimeISOModel(dt=dt, dt_optional=None) AwareDatetimeISOModel.model_validate_json(t.model_dump_json()) - dt = datetime(2023, 10, 10, 1, 1, 1, microsecond=123, tzinfo=timezone.utc) + dt = datetime(2023, 10, 10, 1, 1, 1, microsecond=123, tzinfo=UTC) t = AwareDatetimeISOModel(dt=dt, dt_optional=dt) AwareDatetimeISOModel.model_validate_json(t.model_dump_json()) diff --git a/tests/models/custom_types/test_dsn.py b/tests/models/custom_types/test_dsn.py index 16e1f83..050976e 100644 --- a/tests/models/custom_types/test_dsn.py +++ b/tests/models/custom_types/test_dsn.py @@ -11,9 +11,9 @@ from generalresearch.models.custom_types import DaskDsn, SentryDsn class SettingsModel(BaseModel): - dask: Optional["DaskDsn"] = Field(default=None) - sentry: Optional["SentryDsn"] = Field(default=None) - db: Optional["MySQLDsn"] = Field(default=None) + dask: DaskDsn | None = Field(default=None) + sentry: SentryDsn | None = Field(default=None) + db: MySQLDsn | None = Field(default=None) # --- Pytest themselves --- |
