Skip to content

Commit

Permalink
fix version issue and spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
milocress committed May 24, 2024
1 parent b1fbbef commit 313d52b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/utils/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def create_exception_object(exception_name: str):
)
# get required arg types of exception class by inspecting its __init__ method

required_args = inspect.get_annotations(exception_class.__init__)
if hasattr(inspect, 'get_annotations'):
required_args = inspect.get_annotations(exception_class.__init__)
else:
required_args = exception_class.__init__.__annotations__ # python 3.9 and below

# create a dictionary of required args with default values

Expand Down

0 comments on commit 313d52b

Please sign in to comment.