mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-11-18 21:51:04 +08:00
Various stubtest exceptions (#5227)
This commit is contained in:
1 parent
4d734e38dd
commit
c9d996fe55
10 files changed
+108
-70
No files matched your search
@@ -1,13 +1,17 @@
|
||||
from typing import IO, Mapping, Optional, Union
|
||||
from email.message import Message
|
||||
from typing import IO, Mapping, Optional, Tuple, Union
|
||||
from urllib.response import addinfourl
|
||||
|
||||
# Stubs for urllib.error
|
||||
|
||||
class URLError(IOError):
|
||||
reason: Union[str, BaseException]
|
||||
def __init__(self, reason: Union[str, BaseException], filename: Optional[str] = ...) -> None: ...
|
||||
|
||||
class HTTPError(URLError, addinfourl):
|
||||
code: int
|
||||
def __init__(self, url: str, code: int, msg: str, hdrs: Mapping[str, str], fp: Optional[IO[bytes]]) -> None: ...
|
||||
|
||||
class ContentTooShortError(URLError): ...
|
||||
class ContentTooShortError(URLError):
|
||||
content: Tuple[str, Message]
|
||||
def __init__(self, message: str, content: Tuple[str, Message]) -> None: ...
|
||||
Reference in new issue
Block a user