mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Add missing type hints to subprocess.pyi (#539)
This commit is contained in:
committed by
Guido van Rossum
parent
0907e2cdda
commit
052574d821
@@ -2,7 +2,8 @@
|
||||
|
||||
# Based on http://docs.python.org/3.5/library/subprocess.html
|
||||
import sys
|
||||
from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Optional, Union, List
|
||||
from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Optional, Union, List, Type
|
||||
from types import TracebackType
|
||||
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
@@ -15,7 +16,7 @@ if sys.version_info >= (3, 5):
|
||||
returncode: int,
|
||||
stdout: Union[str, bytes],
|
||||
stderr: Union[str, bytes]) -> None: ...
|
||||
def check_returncode(self): ...
|
||||
def check_returncode(self) -> None: ...
|
||||
|
||||
# Nearly same args as Popen.__init__ except for timeout, input, and check
|
||||
def run(args: Union[str, Sequence[str]],
|
||||
@@ -235,7 +236,7 @@ class Popen:
|
||||
def terminate(self) -> None: ...
|
||||
def kill(self) -> None: ...
|
||||
def __enter__(self) -> 'Popen': ...
|
||||
def __exit__(self, type, value, traceback) -> bool: ...
|
||||
def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> bool: ...
|
||||
|
||||
def getstatusoutput(cmd: str) -> Tuple[int, str]: ...
|
||||
def getoutput(cmd: str) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user