mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add missing __init__ and isclosed to http.client.HTTPResponse
This commit is contained in:
committed by
Łukasz Langa
parent
f7aedb4d21
commit
da11ecf773
@@ -87,6 +87,8 @@ if sys.version_info >= (3, 5):
|
||||
closed = ... # type: bool
|
||||
status = ... # type: int
|
||||
reason = ... # type: str
|
||||
def __init__(self, sock, debuglevel: int = ...,
|
||||
method: Optional[str] = ..., url: Optional[str] = ...) -> None: ...
|
||||
def read(self, amt: Optional[int] = ...) -> bytes: ...
|
||||
def readinto(self, b: bytearray) -> int: ...
|
||||
@overload
|
||||
@@ -95,6 +97,7 @@ if sys.version_info >= (3, 5):
|
||||
def getheader(self, name: str, default: _T) -> Union[str, _T]: ...
|
||||
def getheaders(self) -> List[Tuple[str, str]]: ...
|
||||
def fileno(self) -> int: ...
|
||||
def isclosed(self): bool
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def __enter__(self) -> 'HTTPResponse': ...
|
||||
def __exit__(self, exc_type: Optional[type],
|
||||
|
||||
Reference in New Issue
Block a user