Skip to content

Commit

Permalink
subprocess: use narrower types for TimeoutExpired.std* (#8886)
Browse files Browse the repository at this point in the history
See python/cpython#97685

The union type should be acceptable given python/cpython#87597 (comment). In general I'd like us to be able to type this, since these being bytes can be surprising if you pass text=True, but we'll see what mypy_primer says
  • Loading branch information
hauntsaninja authored Oct 12, 2022
1 parent 1894ee9 commit 33e1a34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/subprocess.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1828,8 +1828,8 @@ class TimeoutExpired(SubprocessError):
timeout: float
# morally: _TXT | None
output: Any
stdout: Any
stderr: Any
stdout: bytes | None
stderr: bytes | None

class CalledProcessError(SubprocessError):
returncode: int
Expand Down

0 comments on commit 33e1a34

Please sign in to comment.