8000 fix: Fix type annotation of capture-exception (#702) · lmasikl/sentry-python@baa0843 · GitHub
[go: up one dir, main page]

Skip to content

Commit baa0843

Browse files
authored
fix: Fix type annotation of capture-exception (getsentry#702)
Fix getsentry#682
1 parent 464ca8d commit baa0843

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sentry_sdk/api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
from typing import Callable
1515
from typing import TypeVar
1616
from typing import ContextManager
17+
from typing import Union
1718

18-
from sentry_sdk._types import Event, Hint, Breadcrumb, BreadcrumbHint
19+
from sentry_sdk._types import Event, Hint, Breadcrumb, BreadcrumbHint, ExcInfo
1920
from sentry_sdk.tracing import Span
2021

2122
T = TypeVar("T")
@@ -93,7 +94,7 @@ def capture_message(
9394

9495
@hubmethod
9596
def capture_exception(
96-
error=None, # type: Optional[BaseException]
97+
error=None, # type: Optional[Union[BaseException, ExcInfo]]
9798
scope=None, # type: Optional[Any]
9899
**scope_args # type: Dict[str, Any]
99100
):

0 commit comments

Comments
 (0)
0