Add context manager methods to requests.Response (#1701)

* Add context manager methods to requests.Response

* Simplified the requests.Response.__exit__ signature
This commit is contained in:
Patrick Valsecchi
2017-11-01 16:19:43 +01:00
committed by Jelle Zijlstra
parent 77c06d411c
commit aafa556a10

View File

@@ -2,6 +2,7 @@
from typing import Any, List, MutableMapping, Iterator, Dict, Text
import datetime
import types
from . import hooks
from . import structures
@@ -114,6 +115,8 @@ class Response:
def __bool__(self) -> bool: ...
def __nonzero__(self) -> bool: ...
def __iter__(self) -> Iterator[bytes]: ...
def __enter__(self) -> Response: ...
def __exit__(self, *args: Any) -> None: ...
@property
def ok(self) -> bool: ...
@property