mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-24 18:48:46 +08:00
Improve __enter__ & constructor methods (#7114)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import io
|
||||
from _typeshed import Self
|
||||
from http.client import HTTPMessage as _HttplibHTTPMessage, HTTPResponse as _HttplibHTTPResponse
|
||||
from typing import Any, Iterator, Mapping
|
||||
from typing_extensions import Literal
|
||||
@@ -83,7 +84,7 @@ class HTTPResponse(io.IOBase):
|
||||
def read(self, amt: int | None = ..., decode_content: bool | None = ..., cache_content: bool = ...) -> bytes: ...
|
||||
def stream(self, amt: int | None = ..., decode_content: bool | None = ...) -> Iterator[bytes]: ...
|
||||
@classmethod
|
||||
def from_httplib(cls, r: _HttplibHTTPResponse, **response_kw: Any) -> HTTPResponse: ...
|
||||
def from_httplib(cls: type[Self], r: _HttplibHTTPResponse, **response_kw: Any) -> Self: ...
|
||||
def getheaders(self) -> HTTPHeaderDict: ...
|
||||
def getheader(self, name, default=...) -> str | None: ...
|
||||
def info(self) -> HTTPHeaderDict: ...
|
||||
|
||||
Reference in New Issue
Block a user