From 90e3d38d5e59d12be816903d66e813fc2ec0c185 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Tue, 11 Oct 2022 21:05:37 -0700 Subject: [PATCH] subprocess: use narrower types for TimeoutExpired.std* See https://github.com/python/cpython/pull/97685 Thinking we'll go off of mypy_primer to decide if the union type here is acceptable or not. I'd like us to be able to type this, since the values being bytes can be surprising if you pass text=True --- stdlib/subprocess.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/subprocess.pyi b/stdlib/subprocess.pyi index fded3f74928e..25b988adc52d 100644 --- a/stdlib/subprocess.pyi +++ b/stdlib/subprocess.pyi @@ -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