Browse Source

✏️ Fix Pydantic examples in tutorial for Python types (#9961)

Co-authored-by: Sebastián Ramírez <[email protected]>
pull/10204/head
Rahul Salgare 2 years ago
committed by GitHub
parent
commit
0242ca7566
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs_src/python_types/tutorial011.py
  2. 2
      docs_src/python_types/tutorial011_py310.py
  3. 2
      docs_src/python_types/tutorial011_py39.py

2
docs_src/python_types/tutorial011.py

@ -6,7 +6,7 @@ from pydantic import BaseModel
class User(BaseModel):
id: int
name = "John Doe"
name: str = "John Doe"
signup_ts: Union[datetime, None] = None
friends: List[int] = []

2
docs_src/python_types/tutorial011_py310.py

@ -5,7 +5,7 @@ from pydantic import BaseModel
class User(BaseModel):
id: int
name = "John Doe"
name: str = "John Doe"
signup_ts: datetime | None = None
friends: list[int] = []

2
docs_src/python_types/tutorial011_py39.py

@ -6,7 +6,7 @@ from pydantic import BaseModel
class User(BaseModel):
id: int
name = "John Doe"
name: str = "John Doe"
signup_ts: Union[datetime, None] = None
friends: list[int] = []

Loading…
Cancel
Save