Skip to content

Commit 87498d4

Browse files
fix: configure ruff TC001 for Pydantic runtime-evaluated base classes
- Add [tool.ruff.lint.flake8-type-checking] runtime-evaluated-base-classes for pydantic.BaseModel so Pydantic field type imports aren't flagged - Remove 4 stale noqa comments auto-fixed by ruff
1 parent 8cc7df1 commit 87498d4

5 files changed

Lines changed: 7 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ ignore = [
146146
"TRY003", # Long exception messages outside class - common pattern
147147
]
148148

149+
[tool.ruff.lint.flake8-type-checking]
150+
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
151+
149152
[tool.mypy]
150153
python_version = "3.12"
151154
warn_return_any = true

src/eopf_geozarr/data_api/geozarr/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from pydantic.experimental.missing_sentinel import MISSING
2525
from typing_extensions import runtime_checkable
2626

27-
from eopf_geozarr.data_api.geozarr.projjson import ProjJSON # noqa: TC001
27+
from eopf_geozarr.data_api.geozarr.projjson import ProjJSON
2828

2929
if TYPE_CHECKING:
3030
from collections.abc import Mapping

src/eopf_geozarr/data_api/geozarr/geoproj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from zarr_cm import geo_proj
99

1010
from eopf_geozarr.data_api.geozarr.common import is_none
11-
from eopf_geozarr.data_api.geozarr.projjson import ProjJSON # noqa: TC001
11+
from eopf_geozarr.data_api.geozarr.projjson import ProjJSON
1212

1313
PROJ_UUID = geo_proj.UUID
1414

src/eopf_geozarr/data_api/geozarr/multiscales/geozarr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from pydantic import BaseModel, model_validator
66
from pydantic.experimental.missing_sentinel import MISSING
77
from typing_extensions import TypedDict
8-
from zarr_cm import ConventionMetadataObject # noqa: TC002
8+
from zarr_cm import ConventionMetadataObject
99

1010
from . import tms, zcm
1111

src/eopf_geozarr/data_api/geozarr/multiscales/tms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from pydantic import BaseModel
44

5-
from eopf_geozarr.data_api.geozarr.types import ResamplingMethod # noqa: TC001
5+
from eopf_geozarr.data_api.geozarr.types import ResamplingMethod
66

77

88
class TileMatrix(BaseModel):

0 commit comments

Comments
 (0)