Skip to content

Commit

Permalink
[c] Small update type annotation for python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
huynguyengl99 committed Apr 1, 2024
1 parent f371639 commit a965338
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion headless_cms/forms.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Union

from localized_fields.forms import LocalizedFieldForm
from localized_fields.value import LocalizedStringValue
from martor.fields import MartorFormField
Expand All @@ -6,7 +8,7 @@


class _LocalizedMartorField(LocalizedFieldForm):
def __init__(self, *args, required: bool | list[str] = False, **kwargs):
def __init__(self, *args, required: Union[bool, list[str]] = False, **kwargs):
kwargs.pop("label", None)
super().__init__(*args, required=required, **kwargs)

Expand Down

0 comments on commit a965338

Please sign in to comment.