capa icon indicating copy to clipboard operation
capa copied to clipboard

Changing type annotation in simple_message_exception_handler

Open aaronatp opened this issue 1 year ago • 0 comments

When capa drops support for Python 3.8, let's add in the type annotation for the exctype parameter in the simple_message_exception_handler function definition in main.py. The type annotation would be "type[BaseException]". However, the built-in type() function is not subscriptable in Python 3.8 (only Python 3.9 and above) - that is why the type annotation is not currently included.

Once we've done that, let's also take out the "# type: ignore[argument]" statement that we use in the main function to disable mypy warnings relating to the type annotation issue.

aaronatp avatar Dec 08 '23 10:12 aaronatp