Skip to content

Commit 18d31ba

Browse files
type hint update for Python 3.9 and later (#311)
* type hint update for Python 3.9 and later * use different assertions --------- Co-authored-by: Daniel Townsend <[email protected]>
1 parent 2ffc11b commit 18d31ba

File tree

38 files changed

+604
-599
lines changed

38 files changed

+604
-599
lines changed

docs/source/session_auth/examples/example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import datetime
2-
import typing as t
2+
from typing import Any
33

44
from fastapi import FastAPI
55
from fastapi.responses import JSONResponse
@@ -71,16 +71,16 @@
7171
# Example FastAPI endpoints and Pydantic models.
7272

7373

74-
MovieModelIn: t.Any = create_pydantic_model(
74+
MovieModelIn: Any = create_pydantic_model(
7575
table=Movie, model_name="MovieModelIn"
7676
)
7777

78-
MovieModelOut: t.Any = create_pydantic_model(
78+
MovieModelOut: Any = create_pydantic_model(
7979
table=Movie, include_default_columns=True, model_name="MovieModelOut"
8080
)
8181

8282

83-
@private_app.get("/movies/", response_model=t.List[MovieModelOut])
83+
@private_app.get("/movies/", response_model=list[MovieModelOut])
8484
async def movies():
8585
return await Movie.select().order_by(Movie._meta.primary_key)
8686

0 commit comments

Comments
 (0)