mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add __all__ for modules beginning with 'h' and 'i' (#7327)
This commit is contained in:
@@ -2,6 +2,8 @@ import sys
|
||||
from enum import IntEnum
|
||||
from typing_extensions import Literal
|
||||
|
||||
__all__ = ["HTTPStatus"]
|
||||
|
||||
class HTTPStatus(IntEnum):
|
||||
@property
|
||||
def phrase(self) -> str: ...
|
||||
|
||||
@@ -7,6 +7,28 @@ from _typeshed import Self, WriteableBuffer
|
||||
from socket import socket
|
||||
from typing import IO, Any, BinaryIO, Callable, Iterable, Iterator, Mapping, Protocol, TypeVar, Union, overload
|
||||
|
||||
__all__ = [
|
||||
"HTTPResponse",
|
||||
"HTTPConnection",
|
||||
"HTTPException",
|
||||
"NotConnected",
|
||||
"UnknownProtocol",
|
||||
"UnknownTransferEncoding",
|
||||
"UnimplementedFileMode",
|
||||
"IncompleteRead",
|
||||
"InvalidURL",
|
||||
"ImproperConnectionState",
|
||||
"CannotSendRequest",
|
||||
"CannotSendHeader",
|
||||
"ResponseNotReady",
|
||||
"BadStatusLine",
|
||||
"LineTooLong",
|
||||
"RemoteDisconnected",
|
||||
"error",
|
||||
"responses",
|
||||
"HTTPSConnection",
|
||||
]
|
||||
|
||||
_DataType = Union[bytes, IO[Any], Iterable[bytes], str]
|
||||
_T = TypeVar("_T")
|
||||
|
||||
|
||||
@@ -4,6 +4,17 @@ from http.client import HTTPResponse
|
||||
from typing import ClassVar, Iterable, Iterator, Pattern, Sequence, TypeVar, overload
|
||||
from urllib.request import Request
|
||||
|
||||
__all__ = [
|
||||
"Cookie",
|
||||
"CookieJar",
|
||||
"CookiePolicy",
|
||||
"DefaultCookiePolicy",
|
||||
"FileCookieJar",
|
||||
"LWPCookieJar",
|
||||
"LoadError",
|
||||
"MozillaCookieJar",
|
||||
]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class LoadError(OSError): ...
|
||||
|
||||
@@ -4,6 +4,8 @@ from typing import Any, Generic, Iterable, Mapping, TypeVar, Union, overload
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
__all__ = ["CookieError", "BaseCookie", "SimpleCookie"]
|
||||
|
||||
_DataType = Union[str, Mapping[str, Union[str, Morsel[Any]]]]
|
||||
_T = TypeVar("_T")
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import sys
|
||||
from _typeshed import StrPath, SupportsRead, SupportsWrite
|
||||
from typing import Any, AnyStr, BinaryIO, ClassVar, Mapping, Sequence
|
||||
|
||||
__all__ = ["HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler", "SimpleHTTPRequestHandler", "CGIHTTPRequestHandler"]
|
||||
|
||||
class HTTPServer(socketserver.TCPServer):
|
||||
server_name: str
|
||||
server_port: int
|
||||
|
||||
Reference in New Issue
Block a user