The type hint for capture_exception() implies only ValueErrors can be passed in, which causes a type check warning in IDEs such as PyCharm when you pass in a non-ValueError exception.
|
def capture_exception(error=None): |
|
# type: (ValueError) -> Optional[str] |
I suppose the hint should be more like
# type: (BaseException) -> Optional[str]
The type hint for
capture_exception()implies onlyValueErrors can be passed in, which causes a type check warning in IDEs such as PyCharm when you pass in a non-ValueError exception.sentry-python/sentry_sdk/api.py
Lines 53 to 54 in 62e3a64
I suppose the hint should be more like
# type: (BaseException) -> Optional[str]