Skip to content

Commit

Permalink
ref(types): Correct ExcInfo type
Browse files Browse the repository at this point in the history
Previously, we defined `ExcInfo` as `tuple[Type[BaseException] | None, BaseException | None, TracebackType | None]`, when in fact, the correct type is the narrower `tuple[Type[BaseException], BaseException, TracebackType] | tuple[None, None, None]`.
  • Loading branch information
szokeasaurusrex committed Jul 10, 2024
1 parent 91b90cd commit 143d7e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sentry_sdk/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@
total=False,
)

ExcInfo = Tuple[
Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]
ExcInfo = Union[
tuple[Type[BaseException], BaseException, TracebackType],
tuple[None, None, None],
]

Hint = Dict[str, Any]
Expand Down

0 comments on commit 143d7e7

Please sign in to comment.