Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FumingZhang committed Jul 30, 2024
1 parent 35f5fde commit 3f07771
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def validate_decorator_mode(decorator_mode) -> bool:
"""
is_valid_decorator_mode = False
try:
is_valid_decorator_mode = decorator_mode in DecoratorMode
if decorator_mode is not None and type(decorator_mode) == DecoratorMode:
is_valid_decorator_mode = decorator_mode in DecoratorMode
# will raise TypeError in Python >= 3.8
except TypeError:
pass
Expand Down

0 comments on commit 3f07771

Please sign in to comment.