Skip to content

Commit

Permalink
Change how we get StrOrBytesPath to match _file_io.py
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCat467 committed Nov 4, 2023
1 parent dda9935 commit a6651cb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/trio/_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@
from ._util import NoPublicConstructor, final

if TYPE_CHECKING:
from _typeshed import (
StrOrBytesPath,
)
from typing_extensions import Self, TypeAlias


# Only subscriptable in 3.9+
StrOrBytesPath: TypeAlias = Union[str, bytes, "os.PathLike[str]", "os.PathLike[bytes]"]
else:
# Only subscriptable in 3.9+
StrOrBytesPath: TypeAlias = Union[
str, bytes, "os.PathLike[str]", "os.PathLike[bytes]"
]


# Linux-specific, but has complex lifetime management stuff so we hard-code it
Expand Down

0 comments on commit a6651cb

Please sign in to comment.