diff --git a/stdlib/3/urllib/error.pyi b/stdlib/3/urllib/error.pyi index 83dcf8f8d..926f32d03 100644 --- a/stdlib/3/urllib/error.pyi +++ b/stdlib/3/urllib/error.pyi @@ -1,4 +1,4 @@ -from typing import IO, Mapping, Union +from typing import IO, Mapping, Optional, Union from urllib.response import addinfourl # Stubs for urllib.error @@ -8,6 +8,6 @@ class URLError(IOError): class HTTPError(URLError, addinfourl): code: int - def __init__(self, url: str, code: int, msg: str, hdrs: Mapping[str, str], fp: IO[bytes]) -> None: ... + def __init__(self, url: str, code: int, msg: str, hdrs: Mapping[str, str], fp: Optional[IO[bytes]]) -> None: ... class ContentTooShortError(URLError): ...