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 e49b031
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/_pytest/_code/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from typing import Sequence
from typing import SupportsIndex
from typing import TypeVar
from typing import Union

import pluggy

Expand All @@ -53,7 +54,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 e49b031

Please sign in to comment.