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:
Ingmar Steen
2019-02-09 15:19:54 +01:00
committed by Sebastian Rittau
parent 0b6d134795
commit c5713205ff

View File

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