mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Allow None in fp argument to HTTPError (#4660)
This commit is contained in:
@@ -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): ...
|
||||
|
||||
Reference in New Issue
Block a user