Skip to content

Commit cb98538

Browse files
authored
Fix errisinstance typing (#12700)
Fixes #12667
1 parent 49eafce commit cb98538

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog/12667.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a regression where type change in `ExceptionInfo.errisinstance` caused `mypy` to fail.

src/_pytest/_code/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
TracebackStyle = Literal["long", "short", "line", "no", "native", "value", "auto"]
5858

59-
EXCEPTION_OR_MORE = Union[Type[Exception], Tuple[Type[Exception], ...]]
59+
EXCEPTION_OR_MORE = Union[Type[BaseException], Tuple[Type[BaseException], ...]]
6060

6161

6262
class Code:

0 commit comments

Comments
 (0)