Skip to content

Commit 124ff0f

Browse files
authored
Update syntax to Python 3.9+
Refactor type hints to use built-in list instead of List from typing.
1 parent 6291fde commit 124ff0f

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

tests/test_pydantic/test_generic.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
from typing import Generic, List, Optional, TypeVar
1+
from typing import Generic, Optional, TypeVar
22

33
import pydantic
44
import pytest
55
from sqlmodel import SQLModel
66

7-
from tests.conftest import needs_pydanticv2
8-
97
# Example adapted from
108
# https://docs.pydantic.dev/2.10/concepts/models/#generic-models
119
DataT = TypeVar("DataT")
1210

1311

1412
class DataModel(SQLModel):
15-
numbers: List[int]
16-
people: List[str]
13+
numbers: list[int]
14+
people: list[str]
1715

1816

1917
class Response(SQLModel, Generic[DataT]):
2018
data: Optional[DataT] = None
2119

2220

23-
@needs_pydanticv2
2421
@pytest.mark.parametrize(
2522
["data_type", "data_value"],
2623
[

0 commit comments

Comments
 (0)