mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
subprocess: mark arg keyword-only, fix name, add property (#4024)
This commit is contained in:
@@ -448,6 +448,7 @@ def call(args: _CMD,
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
pass_fds: Any = ...,
|
||||
*,
|
||||
timeout: Optional[float] = ...) -> int: ...
|
||||
|
||||
# Same args as Popen.__init__
|
||||
@@ -751,9 +752,9 @@ else:
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
pass_fds: Any = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
input: _TXT = ...,
|
||||
*,
|
||||
timeout: Optional[float] = ...,
|
||||
universal_newlines: Literal[True],
|
||||
) -> str: ...
|
||||
@overload
|
||||
@@ -773,8 +774,9 @@ else:
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
pass_fds: Any = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
input: _TXT = ...,
|
||||
*,
|
||||
timeout: Optional[float] = ...,
|
||||
) -> bytes: ...
|
||||
@overload
|
||||
def check_output(args: _CMD,
|
||||
@@ -793,8 +795,9 @@ else:
|
||||
restore_signals: bool = ...,
|
||||
start_new_session: bool = ...,
|
||||
pass_fds: Any = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
input: _TXT = ...,
|
||||
*,
|
||||
timeout: Optional[float] = ...,
|
||||
) -> Any: ... # morally: -> _TXT
|
||||
|
||||
|
||||
@@ -837,6 +840,7 @@ class Popen(Generic[AnyStr]):
|
||||
stderr: Optional[IO[AnyStr]]
|
||||
pid: int
|
||||
returncode: int
|
||||
universal_newlines: bool
|
||||
|
||||
# Technically it is wrong that Popen provides __new__ instead of __init__
|
||||
# but this shouldn't come up hopefully?
|
||||
@@ -1166,7 +1170,7 @@ class Popen(Generic[AnyStr]):
|
||||
timeout: Optional[float] = ...,
|
||||
# morally this should be optional
|
||||
) -> Tuple[AnyStr, AnyStr]: ...
|
||||
def send_signal(self, signal: int) -> None: ...
|
||||
def send_signal(self, sig: int) -> None: ...
|
||||
def terminate(self) -> None: ...
|
||||
def kill(self) -> None: ...
|
||||
def __enter__(self: _S) -> _S: ...
|
||||
|
||||
Reference in New Issue
Block a user