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
This commit is contained in:
Cooper Lees
2017-06-01 17:46:14 -07:00
committed by Guido van Rossum
parent 2161f72990
commit 4656153478
2 changed files with 2 additions and 2 deletions

View File

@@ -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]]

View File

@@ -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]]