diff --git a/path/__init__.py b/path/__init__.py index ef33c5b..61f8ed4 100644 --- a/path/__init__.py +++ b/path/__init__.py @@ -72,7 +72,7 @@ ) if TYPE_CHECKING: - from typing_extensions import Literal, Never, Self + from typing_extensions import Literal, Never, Self, Union from _typeshed import ( OpenBinaryMode, OpenBinaryModeReading, @@ -82,7 +82,7 @@ ExcInfo, ) - _Match = str | Callable[[str], bool] | None + _Match = Union[str, Callable[[str], bool], None] _CopyFn = Callable[[str, str], object] _IgnoreFn = Callable[[str, list[str]], Iterable[str]] _OnErrorCallback = Callable[[Callable[..., Any], str, ExcInfo], object]