Add missing 'headers' property to urllib.error.HTTPError. (#7783)

Seen here: https://docs.python.org/3/library/urllib.error.html#urllib.error.HTTPError.headers
This commit is contained in:
Rebecca Chen
2022-05-05 15:05:51 -06:00
committed by GitHub
parent 92c578546a
commit 46fc7768c4

View File

@@ -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