Skip to content

Commit

Permalink
fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Nov 10, 2023
1 parent 5111d9d commit 0f57e70
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions render_static/transpilers/enums_to_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ def str_prop(self, enum: Type[Enum]):
def __init__( # pylint: disable=R0913
self,
class_name: str = class_name_pattern_,
on_unrecognized: UnrecognizedBehavior = on_unrecognized_,
on_unrecognized: Union[
str,
UnrecognizedBehavior
] = on_unrecognized_,
export: bool = export_,
include_properties: bool = include_properties_,
symmetric_properties: Union[
Expand All @@ -345,9 +348,9 @@ def __init__( # pylint: disable=R0913
self.class_name_pattern_ = class_name
raise_on_not_found = kwargs.pop('raise_on_not_found', None)
self.on_unrecognized_ = (
on_unrecognized
if isinstance(on_unrecognized, UnrecognizedBehavior) else
UnrecognizedBehavior[on_unrecognized]
if isinstance(on_unrecognized, str) else
on_unrecognized
)
if raise_on_not_found is not None:
warnings.warn(
Expand Down

0 comments on commit 0f57e70

Please sign in to comment.