Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from .types import T_OS_RUN_INPUT
from .types import T_OS_EXEC_INPUT

import locale
import typing
Expand Down Expand Up @@ -52,7 +52,7 @@ def get_default_encoding():

@staticmethod
def prepare_process_input(
input: typing.Optional[T_OS_RUN_INPUT],
input: typing.Optional[T_OS_EXEC_INPUT],
encoding: typing.Optional[str],
) -> typing.Optional[bytes]:
assert encoding is None or type(encoding) is str
Expand Down
6 changes: 3 additions & 3 deletions src/local_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from .os_ops import T_OS_TIMEOUT
from .os_ops import T_OS_IO
from .os_ops import T_OS_IO_ID
from .os_ops import T_OS_RUN_INPUT
from .os_ops import T_OS_EXEC_INPUT
from .os_ops import T_OS_EXEC_ENV
from .raise_error import RaiseError
from .helpers import Helpers
Expand Down Expand Up @@ -104,7 +104,7 @@ def returncode(self) -> typing.Optional[int]:

def communicate(
self,
input: typing.Optional[T_OS_RUN_INPUT] = None,
input: typing.Optional[T_OS_EXEC_INPUT] = None,
timeout: typing.Optional[T_OS_TIMEOUT] = None,
) -> OsProcessController.T_COMMUNICATE_RESULT:
assert timeout is None or type(timeout) in [int, float]
Expand Down Expand Up @@ -573,7 +573,7 @@ def run(
text: typing.Optional[bool] = None,
encoding: typing.Optional[str] = None,
shell: bool = False,
input: typing.Optional[T_OS_RUN_INPUT] = None,
input: typing.Optional[T_OS_EXEC_INPUT] = None,
stdin: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
stdout: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
stderr: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
Expand Down
6 changes: 3 additions & 3 deletions src/os_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .types import T_OS_TIMEOUT
from .types import T_OS_IO
from .types import T_OS_IO_ID
from .types import T_OS_RUN_INPUT
from .types import T_OS_EXEC_INPUT
from .types import T_OS_EXEC_ENV
from .raise_error import RaiseError

Expand Down Expand Up @@ -82,7 +82,7 @@ def returncode(self) -> typing.Optional[int]:

def communicate(
self,
input: typing.Optional[T_OS_RUN_INPUT] = None,
input: typing.Optional[T_OS_EXEC_INPUT] = None,
timeout: typing.Optional[T_OS_TIMEOUT] = None
) -> T_COMMUNICATE_RESULT:
assert input is None or type(input) in [str, bytes]
Expand Down Expand Up @@ -234,7 +234,7 @@ def run(
text: typing.Optional[bool] = None,
encoding: typing.Optional[str] = None,
shell: bool = False,
input: typing.Optional[T_OS_RUN_INPUT] = None,
input: typing.Optional[T_OS_EXEC_INPUT] = None,
stdin: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
stdout: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
stderr: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
Expand Down
8 changes: 4 additions & 4 deletions src/remote_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from .os_ops import T_OS_TIMEOUT
from .os_ops import T_OS_IO
from .os_ops import T_OS_IO_ID
from .os_ops import T_OS_RUN_INPUT
from .os_ops import T_OS_EXEC_INPUT
from .os_ops import T_OS_EXEC_ENV
from .raise_error import RaiseError
from .helpers import Helpers
Expand Down Expand Up @@ -194,7 +194,7 @@ def returncode(self) -> typing.Optional[int]:

def communicate(
self,
input: typing.Optional[T_OS_RUN_INPUT] = None,
input: typing.Optional[T_OS_EXEC_INPUT] = None,
timeout: typing.Optional[T_OS_TIMEOUT] = None,
) -> OsProcessController.T_COMMUNICATE_RESULT:
assert timeout is None or type(timeout) in [int, float]
Expand Down Expand Up @@ -740,7 +740,7 @@ def run(
text: typing.Optional[bool] = None,
encoding: typing.Optional[str] = None,
shell: bool = False,
input: typing.Optional[T_OS_RUN_INPUT] = None,
input: typing.Optional[T_OS_EXEC_INPUT] = None,
stdin: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
stdout: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
stderr: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
Expand Down Expand Up @@ -1869,7 +1869,7 @@ def _transport_run(
text: typing.Optional[bool] = None,
encoding: typing.Optional[str] = None,
shell: bool = False,
input: typing.Optional[T_OS_RUN_INPUT] = None,
input: typing.Optional[T_OS_EXEC_INPUT] = None,
stdin: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
stdout: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
stderr: typing.Optional[T_OS_IO_ID] = subprocess.PIPE,
Expand Down
2 changes: 1 addition & 1 deletion src/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
T_OS_TIMEOUT = typing.Union[int, float]
T_OS_IO = typing.IO[typing.Any]
T_OS_IO_ID = typing.Union[int, T_OS_IO]
T_OS_RUN_INPUT = typing.Union[str, bytes]
T_OS_EXEC_INPUT = typing.Union[str, bytes]
T_OS_EXEC_ENV = typing.Dict[str, typing.Optional[str]]