Skip to content

Commit

Permalink
Appease CI
Browse files Browse the repository at this point in the history
  • Loading branch information
A5rocks committed Feb 16, 2025
1 parent 09fe32f commit b81444d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/3183.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update type hints for `trio.run_process` and `trio.lowlevel.open_process`.
12 changes: 12 additions & 0 deletions src/trio/_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,8 @@ async def killer() -> None:


class GeneralProcessArgs(TypedDict, total=False):
"""Arguments shared between all runs."""

stdout: int | HasFileno | None
stderr: int | HasFileno | None
close_fds: bool
Expand All @@ -814,6 +816,8 @@ class GeneralProcessArgs(TypedDict, total=False):
if sys.platform == "win32":

class WindowsProcessArgs(GeneralProcessArgs, total=False):
"""Arguments shared between all Windows runs."""

shell: bool
startupinfo: subprocess.STARTUPINFO | None
creationflags: int
Expand Down Expand Up @@ -1086,6 +1090,8 @@ async def my_deliver_cancel(process):
# readers (?)

class UnixProcessArgs3_9(GeneralProcessArgs, total=False):
"""Arguments shared between all Unix runs."""

preexec_fn: Callable[[], object] | None
restore_signals: bool
start_new_session: bool
Expand All @@ -1098,12 +1104,18 @@ class UnixProcessArgs3_9(GeneralProcessArgs, total=False):
umask: int

class UnixProcessArgs3_10(UnixProcessArgs3_9, total=False):
"""Arguments shared between all Unix runs on 3.10+."""

pipesize: int

class UnixProcessArgs3_11(UnixProcessArgs3_10, total=False):
"""Arguments shared between all Unix runs on 3.11+."""

process_group: int

class UnixRunProcessMixin(TypedDict, total=False):
"""Arguments unique to run_process on Unix."""

task_status: TaskStatus[Process]
capture_stdout: bool
capture_stderr: bool
Expand Down

0 comments on commit b81444d

Please sign in to comment.