mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 19:32:13 +08:00
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:
committed by
Jelle Zijlstra
parent
77c06d411c
commit
aafa556a10
3
third_party/2and3/requests/models.pyi
vendored
3
third_party/2and3/requests/models.pyi
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user