mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Add missing type hints in http.client (#5734)
* Add missing type hints in http.client * Add http.client.HTTPConnection.response_class to exclude list
This commit is contained in:
@@ -90,7 +90,8 @@ NETWORK_AUTHENTICATION_REQUIRED: int
|
||||
|
||||
responses: Dict[int, str]
|
||||
|
||||
class HTTPMessage(email.message.Message): ...
|
||||
class HTTPMessage(email.message.Message):
|
||||
def getallmatchingheaders(self, name: str) -> list[str]: ... # undocumented
|
||||
|
||||
def parse_headers(fp: io.BufferedIOBase, _class: Callable[[], email.message.Message] = ...) -> HTTPMessage: ...
|
||||
|
||||
@@ -103,6 +104,7 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO):
|
||||
status: int
|
||||
reason: str
|
||||
def __init__(self, sock: socket, debuglevel: int = ..., method: Optional[str] = ..., url: Optional[str] = ...) -> None: ...
|
||||
def peek(self, n: int = ...) -> bytes: ...
|
||||
def read(self, amt: Optional[int] = ...) -> bytes: ...
|
||||
def read1(self, n: int = ...) -> bytes: ...
|
||||
def readinto(self, b: WriteableBuffer) -> int: ...
|
||||
@@ -142,6 +144,10 @@ class _HTTPConnectionProtocol(Protocol):
|
||||
) -> HTTPConnection: ...
|
||||
|
||||
class HTTPConnection:
|
||||
auto_open: int = ... # undocumented
|
||||
debuglevel: int = ...
|
||||
default_port: int = ... # undocumented
|
||||
response_class: Type[HTTPResponse] = ... # undocumented
|
||||
timeout: Optional[float]
|
||||
host: str
|
||||
port: int
|
||||
|
||||
@@ -88,6 +88,7 @@ enum.EnumMeta.__call__
|
||||
enum.EnumMeta.__new__
|
||||
http.HTTPStatus.description # set in __new__
|
||||
http.HTTPStatus.phrase # set in __new__
|
||||
http.client.HTTPConnection.response_class # the actual type at runtime is abc.ABCMeta
|
||||
imaplib.IMAP4_SSL.ssl # Dependent on SSL existence
|
||||
importlib.abc.FileLoader.get_filename # Wrapped with _check_name decorator which changes runtime signature
|
||||
importlib.abc.FileLoader.load_module # Wrapped with _check_name decorator which changes runtime signature
|
||||
|
||||
Reference in New Issue
Block a user