Add None to type union for subprocess.Popen.communicate input. (#743)

* Add `None` to type union for `subprocess.Popen.communicate` stub's `input` parameter.

* subprocess.communicate `input` annotated as `Optional[AnyStr]` for both 2.7 and 3.x; `timeout` as `Optional[float]`.
This commit is contained in:
George King
2016-12-07 17:46:34 -05:00
committed by Jukka Lehtosalo
parent f39f9bf694
commit dccc29bc2f
2 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
# Based on http://docs.python.org/2/library/subprocess.html and Python 3 stub
from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Union, Optional
from typing import Sequence, Any, AnyStr, Mapping, Callable, Tuple, IO, Union, Optional
_FILE = Union[int, IO[Any]]
@@ -87,7 +87,7 @@ class Popen:
def poll(self) -> int: ...
def wait(self) -> int: ...
def communicate(self, input: Union[bytes, unicode] = ...) -> Tuple[Optional[bytes], Optional[bytes]]: ...
def communicate(self, input: Optional[AnyStr] = ...) -> Tuple[Optional[bytes], Optional[bytes]]: ...
def send_signal(self, signal: int) -> None: ...
def terminate(self) -> None: ...
def kill(self) -> None: ...