Skip to content

Commit

Permalink
Cleanup concepts/models(generic) example (#8032)
Browse files Browse the repository at this point in the history
  • Loading branch information
barraponto committed Nov 6, 2023
1 parent 76c68fa commit 2f2c7a8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions docs/concepts/models.md
Expand Up @@ -620,11 +620,6 @@ from pydantic import BaseModel, ValidationError
DataT = TypeVar('DataT')


class Error(BaseModel):
code: int
message: str


class DataModel(BaseModel):
numbers: List[int]
people: List[str]
Expand All @@ -635,7 +630,6 @@ class Response(BaseModel, Generic[DataT]):


data = DataModel(numbers=[1, 2, 3], people=[])
error = Error(code=404, message='Not found')

print(Response[int](data=1))
#> data=1
Expand Down

0 comments on commit 2f2c7a8

Please sign in to comment.