Skip to content

Commit

Permalink
fix tests for older python
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Dec 11, 2023
1 parent 16b37c1 commit bda4007
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python-fastui/tests/test_json_schema_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def python_model_iter():
NULL_TYPE = {'type': 'null'}


def any_of_simple(any_of: typing.List[typing.Any]) -> typing.List[typing.Any] | None:
def any_of_simple(any_of: typing.List[typing.Any]) -> typing.Union[typing.List[typing.Any], None]:
new_types = []
simple = True
for s in any_of:
Expand All @@ -42,7 +42,7 @@ def any_of_simple(any_of: typing.List[typing.Any]) -> typing.List[typing.Any] |
return new_types


def fix_pydantic_schema(s: typing.Any):
def fix_pydantic_schema(s: typing.Any) -> None:
"""
Convert pydantic JSON schema to match `typescript-json-schema`.
"""
Expand Down

0 comments on commit bda4007

Please sign in to comment.