Skip to content

Commit 1bc1fc2

Browse files
JelleZijlstrasrittau
authored andcommitted
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.
1 parent b7c2625 commit 1bc1fc2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/3/subprocess.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ STDOUT = ... # type: int
209209
DEVNULL = ... # type: int
210210
class SubprocessError(Exception): ...
211211
class TimeoutExpired(SubprocessError):
212+
def __init__(self, cmd: _CMD, timeout: float, output: Optional[_TXT] = ..., stderr: Optional[_TXT] = ...) -> None: ...
212213
# morally: _CMD
213214
cmd = ... # type: Any
214215
timeout = ... # type: float

0 commit comments

Comments
 (0)