Skip to content

Commit d5d2a27

Browse files
use runtime union for EXCEPTION_OR_MORE
1 parent 7c4fde8 commit d5d2a27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/_pytest/_code/code.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
from typing import Pattern
3131
from typing import Sequence
3232
from typing import SupportsIndex
33+
from typing import Tuple
34+
from typing import Type
3335
from typing import TypeVar
36+
from typing import Union
3437

3538
import pluggy
3639

@@ -53,7 +56,7 @@
5356

5457
TracebackStyle = Literal["long", "short", "line", "no", "native", "value", "auto"]
5558

56-
EXCEPTION_OR_MORE = type[Exception] | tuple[type[Exception], ...]
59+
EXCEPTION_OR_MORE = Union[Type[Exception], Tuple[Type[Exception], ...]]
5760

5861
type_alias = type # to sidestep shadowing
5962

0 commit comments

Comments
 (0)