From b624c02de4cff5384b35cd47c3c0f61352d48a9e Mon Sep 17 00:00:00 2001 From: Ruben Date: Wed, 28 Feb 2024 12:15:41 -0800 Subject: [PATCH] support older versions of python --- src/python-fastui/fastui/json_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python-fastui/fastui/json_schema.py b/src/python-fastui/fastui/json_schema.py index 21e01cda..9adeb9d1 100644 --- a/src/python-fastui/fastui/json_schema.py +++ b/src/python-fastui/fastui/json_schema.py @@ -373,7 +373,7 @@ def input_html_type(schema: JsonSchemaField) -> InputHtmlType: raise ValueError(f'Unknown schema: {schema}') from e -def get_default_step(schema: JsonSchemaField) -> _t.Literal['any'] | None: +def get_default_step(schema: JsonSchemaField) -> _t.Union[_t.Literal['any'], None]: key = schema['type'] if key == 'integer': return None