Skip to content

Commit

Permalink
fixed some 3.9 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjunk committed Oct 24, 2024
1 parent c4d627d commit 13dd512
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pydantic_forms/core/asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def generate_form(
state: State,
user_inputs: list[State],
locale: str = "en_US",
extra_translations: dict | None = None,
extra_translations: Union[dict[str, str], None] = None,
) -> Union[State, None]:
"""Generate form using form generator as defined by a form definition."""
try:
Expand All @@ -55,7 +55,7 @@ async def post_form(
state: State,
user_inputs: list[State],
locale: str = "en_US",
extra_translations: dict | None = None,
extra_translations: Union[dict[str, str], None] = None,
) -> State:
"""Post user_input based ond serve a new form if the form wizard logic dictates it."""
# there is no form_generator so we return no validated data
Expand Down Expand Up @@ -120,7 +120,7 @@ async def start_form(
user_inputs: Union[list[State], None] = None,
user: str = "Just a user", # Todo: check if we need users inside form logic?
locale: str = "en_US",
extra_translations: dict | None = None,
extra_translations: Union[dict[str, str], None] = None,
**extra_state: Any,
) -> State:
"""Handle the logic for the endpoint that the frontend uses to render a form with or without prefilled input.
Expand Down
6 changes: 3 additions & 3 deletions pydantic_forms/core/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def generate_form(
state: State,
user_inputs: list[State],
lang: str = "en_US",
extra_translations: dict | None = None,
extra_translations: Union[dict[str, str], None] = None,
) -> Union[State, None]:
"""Generate form using form generator as defined by a form definition."""
try:
Expand All @@ -50,7 +50,7 @@ def post_form(
state: State,
user_inputs: list[State],
locale: str = "en_US",
extra_translations: dict | None = None,
extra_translations: Union[dict[str, str], None] = None,
) -> State:
"""Post user_input based ond serve a new form if the form wizard logic dictates it."""
# there is no form_generator so we return no validated data
Expand Down Expand Up @@ -112,7 +112,7 @@ def start_form(
user_inputs: Union[list[State], None] = None,
user: str = "Just a user", # Todo: check if we need users inside form logic?
locale: str = "en_US",
extra_translations: dict | None = None,
extra_translations: Union[dict[str, str], None] = None,
**extra_state: dict[str, Any],
) -> State:
"""Handle the logic for the endpoint that the frontend uses to render a form with or without prefilled input.
Expand Down

0 comments on commit 13dd512

Please sign in to comment.