Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed Nov 28, 2024
1 parent 73448d7 commit 4505168
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion integration_tests/base_routes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
import pathlib
from collections import defaultdict
from typing import Optional, List
Expand Down Expand Up @@ -559,9 +560,16 @@ async def async_dict_post():

# Body

if sys.version_info >= (3, 9):
# Python 3.9+ syntax
from typing import list as ListType
else:
# Python 3.8 compatible syntax
ListType = List

class TestMyRequest(Body):
items: List[str]
numbers: list[int]
numbers: ListType[int]


@app.post("/sync/body")
Expand Down

0 comments on commit 4505168

Please sign in to comment.