asyncio.subprocess: fix type to include IO instead of just int and match Popen (#1366)

Fixes #1365
This commit is contained in:
Suren Nihalani
2017-05-28 18:58:23 -07:00
committed by Jelle Zijlstra
parent 9f433a57f4
commit d494114214

View File

@@ -3,7 +3,7 @@ from asyncio import protocols
from asyncio import streams
from asyncio import transports
from asyncio.coroutines import coroutine
from typing import Any, AnyStr, Generator, List, Optional, Tuple, Union
from typing import Any, AnyStr, Generator, List, Optional, Tuple, Union, IO
__all__: List[str]
@@ -46,9 +46,9 @@ class Process:
@coroutine
def create_subprocess_shell(
*Args: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236
stdin: int = ...,
stdout: int = ...,
stderr: int = ...,
stdin: Union[int, IO[Any], None] = ...,
stdout: Union[int, IO[Any], None] = ...,
stderr: Union[int, IO[Any], None] = ...,
loop: events.AbstractEventLoop = ...,
limit: int = ...,
**kwds: Any
@@ -58,9 +58,9 @@ def create_subprocess_shell(
def create_subprocess_exec(
program: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236
*args: Any,
stdin: int = ...,
stdout: int = ...,
stderr: int = ...,
stdin: Union[int, IO[Any], None] = ...,
stdout: Union[int, IO[Any], None] = ...,
stderr: Union[int, IO[Any], None] = ...,
loop: events.AbstractEventLoop = ...,
limit: int = ...,
**kwds: Any