add constructor arguments for TimeoutExpired (#2466)

Previously, constructing a TimeoutExpired directly worked because Exception allowed arbitrary kwargs. We fixed that recently, but now mypy gives an error on creating a TimeoutExpired with legal arguments.
This commit is contained in:
Jelle Zijlstra
2018-09-18 05:02:38 -07:00
committed by Sebastian Rittau
parent b7c262523b
commit 1bc1fc2117

View File

@@ -209,6 +209,7 @@ STDOUT = ... # type: int
DEVNULL = ... # type: int
class SubprocessError(Exception): ...
class TimeoutExpired(SubprocessError):
def __init__(self, cmd: _CMD, timeout: float, output: Optional[_TXT] = ..., stderr: Optional[_TXT] = ...) -> None: ...
# morally: _CMD
cmd = ... # type: Any
timeout = ... # type: float