Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit 3a6cc7f

Browse files
use type statements
1 parent 6b1eb67 commit 3a6cc7f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "MIT"
77
readme = "README.md"
88

99
[tool.poetry.dependencies]
10-
python = "^3.9"
10+
python = "3.12.*"
1111
fastapi = "^0.115.0"
1212
pydantic = "^2.9.2"
1313
geojson-pydantic = "^1.1.1"

stapi_fastapi/types/datetime_interval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def serialize(
3131
return f"{value[0].isoformat()}/{value[1].isoformat()}"
3232

3333

34-
DatetimeInterval = Annotated[
34+
type DatetimeInterval = Annotated[
3535
tuple[AwareDatetime, AwareDatetime],
3636
BeforeValidator(validate_before),
3737
AfterValidator(validate_after),

stapi_fastapi/types/filter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Annotated, TypeAlias
1+
from typing import Annotated
22

33
from pydantic import BeforeValidator
44
from pygeofilter.parsers import cql2_json
@@ -13,7 +13,7 @@ def validate(v: dict):
1313
return v
1414

1515

16-
CQL2Filter: TypeAlias = Annotated[
16+
type CQL2Filter = Annotated[
1717
dict,
1818
BeforeValidator(validate),
1919
]

stapi_fastapi/types/json_schema_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Annotated, Any, Type, TypeAlias
1+
from typing import Annotated, Any, Type
22

33
from pydantic import (
44
BaseModel,
@@ -18,7 +18,7 @@ def serialize(v: Type[BaseModel]) -> dict[str, Any]:
1818
return v.model_json_schema()
1919

2020

21-
JsonSchemaModel: TypeAlias = Annotated[
21+
type JsonSchemaModel = Annotated[
2222
Type[BaseModel],
2323
PlainValidator(validate),
2424
PlainSerializer(serialize),

0 commit comments

Comments
 (0)