mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 13:02:22 +08:00
requests.auth.AuthBase.__call__ deals with PreparedRequest. (#2759)
Both the argument and the return type are expected to be instances of requests.models.PreparedRequest, not requests.models.Request.
This commit is contained in:
committed by
Sebastian Rittau
parent
0b6d134795
commit
c5713205ff
2
third_party/2and3/requests/auth.pyi
vendored
2
third_party/2and3/requests/auth.pyi
vendored
@@ -18,7 +18,7 @@ CONTENT_TYPE_MULTI_PART = ... # type: Any
|
||||
def _basic_auth_str(username: Union[bytes, Text], password: Union[bytes, Text]) -> str: ...
|
||||
|
||||
class AuthBase:
|
||||
def __call__(self, r: models.Request) -> models.Request: ...
|
||||
def __call__(self, r: models.PreparedRequest) -> models.PreparedRequest: ...
|
||||
|
||||
class HTTPBasicAuth(AuthBase):
|
||||
username = ... # type: Any
|
||||
|
||||
Reference in New Issue
Block a user