Add missing __init__ and isclosed to http.client.HTTPResponse

This commit is contained in:
David Euresti
2017-02-21 12:44:43 -08:00
committed by Łukasz Langa
parent f7aedb4d21
commit da11ecf773

View File

@@ -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],