From 46fc7768c4df6f713e81a0078e72b9805679c25f Mon Sep 17 00:00:00 2001 From: Rebecca Chen Date: Thu, 5 May 2022 15:05:51 -0600 Subject: [PATCH] Add missing 'headers' property to urllib.error.HTTPError. (#7783) Seen here: https://docs.python.org/3/library/urllib.error.html#urllib.error.HTTPError.headers --- stdlib/urllib/error.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/urllib/error.pyi b/stdlib/urllib/error.pyi index 48c8287e9..7a4de10d7 100644 --- a/stdlib/urllib/error.pyi +++ b/stdlib/urllib/error.pyi @@ -9,6 +9,8 @@ class URLError(IOError): def __init__(self, reason: str | BaseException, filename: str | None = ...) -> None: ... class HTTPError(URLError, addinfourl): + @property + def headers(self) -> Message: ... # type: ignore[override] @property def reason(self) -> str: ... # type: ignore[override] code: int