Skip to content

Commit

Permalink
mypy test new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalik committed Oct 1, 2023
1 parent 6e17850 commit 8c4051b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/mypy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ class Payload(Schema):


@api.post("/old_way")
def old_way(_request: HttpRequest, data: Payload = Body()) -> Any:
def old_way(request: HttpRequest, data: Payload = Body()) -> Any:
data.s.capitalize()


@api.post("/annotated_way")
def annotated_way(_request: HttpRequest, data: Annotated[Payload, Body()]) -> Any:
def annotated_way(request: HttpRequest, data: Annotated[Payload, Body()]) -> Any:
data.s.capitalize()


@api.post("/new_way")
def new_way(_request: HttpRequest, data: Body[Payload]) -> Any:
def new_way(request: HttpRequest, data: Body[Payload]) -> Any:
data.s.capitalize()


@api.post("/new_way_ex")
def new_way_ex(_request: HttpRequest, data: BodyEx[Payload, P(title="A title")]) -> Any:
def new_way_ex(request: HttpRequest, data: BodyEx[Payload, P(title="A title")]) -> Any:
data.s.find("")

0 comments on commit 8c4051b

Please sign in to comment.