mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 12:51:27 +08:00
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:
committed by
Guido van Rossum
parent
2161f72990
commit
4656153478
@@ -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]]
|
||||
|
||||
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user