Skip to content

Commit 33e1a34

Browse files
authored
subprocess: use narrower types for TimeoutExpired.std* (#8886)
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
1 parent 1894ee9 commit 33e1a34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/subprocess.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1828,8 +1828,8 @@ class TimeoutExpired(SubprocessError):
18281828
timeout: float
18291829
# morally: _TXT | None
18301830
output: Any
1831-
stdout: Any
1832-
stderr: Any
1831+
stdout: bytes | None
1832+
stderr: bytes | None
18331833

18341834
class CalledProcessError(SubprocessError):
18351835
returncode: int

0 commit comments

Comments
 (0)