From 465615347834377f22e7550bd914ed4ec2a95a00 Mon Sep 17 00:00:00 2001 From: Cooper Lees Date: Thu, 1 Jun 2017 17:46:14 -0700 Subject: [PATCH] Allow subprocess stdout + stderr be Optional (#1375) - Adding optional to _FILE for stderr + stdout arguments to subprocess functions - Sometimes you might want subprocess commands to be quiet and other time print the output --- stdlib/2/subprocess.pyi | 2 +- stdlib/3/subprocess.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2/subprocess.pyi b/stdlib/2/subprocess.pyi index 06934c65d..047b6bd72 100644 --- a/stdlib/2/subprocess.pyi +++ b/stdlib/2/subprocess.pyi @@ -4,7 +4,7 @@ from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Union, Optional, List, Text -_FILE = Union[int, IO[Any]] +_FILE = Union[None, int, IO[Any]] _TXT = Union[bytes, Text] _CMD = Union[_TXT, Sequence[_TXT]] _ENV = Union[Mapping[bytes, _TXT], Mapping[Text, _TXT]] diff --git a/stdlib/3/subprocess.pyi b/stdlib/3/subprocess.pyi index 958937153..d8e973e9d 100644 --- a/stdlib/3/subprocess.pyi +++ b/stdlib/3/subprocess.pyi @@ -5,7 +5,7 @@ import sys from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Optional, Union, List, Type, Text from types import TracebackType -_FILE = Union[int, IO[Any]] +_FILE = Union[None, int, IO[Any]] _TXT = Union[bytes, Text] _CMD = Union[_TXT, Sequence[_TXT]] _ENV = Union[Mapping[bytes, _TXT], Mapping[Text, _TXT]]