Skip to content

Commit

Permalink
use runtime union for EXCEPTION_OR_MORE
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Jun 17, 2024
1 parent 7c4fde8 commit d5d2a27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/_pytest/_code/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
from typing import Pattern
from typing import Sequence
from typing import SupportsIndex
from typing import Tuple
from typing import Type
from typing import TypeVar
from typing import Union

import pluggy

Expand All @@ -53,7 +56,7 @@

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

EXCEPTION_OR_MORE = type[Exception] | tuple[type[Exception], ...]
EXCEPTION_OR_MORE = Union[Type[Exception], Tuple[Type[Exception], ...]]

type_alias = type # to sidestep shadowing

Expand Down

0 comments on commit d5d2a27

Please sign in to comment.