|
1 | | -from logging import Logger |
2 | 1 | from typing import Any |
| 2 | +from logging import Logger |
3 | 3 |
|
| 4 | +import requests |
4 | 5 | from authlib.integrations.base_client.sync_app import OAuth1Base, OAuth2Base |
5 | 6 |
|
6 | 7 | log: Logger |
7 | 8 |
|
8 | 9 | __all__ = ["AsyncOAuth1Mixin", "AsyncOAuth2Mixin"] |
9 | 10 |
|
10 | 11 | class AsyncOAuth1Mixin(OAuth1Base): |
11 | | - async def request(self, method, url, token=None, **kwargs): ... |
| 12 | + async def request(self, method: str, url: str, token: dict[str, Any] | None =None, **kwargs) -> requests.Response: ... |
12 | 13 | async def create_authorization_url(self, redirect_uri: str | None = None, **kwargs) -> dict[str, Any]: ... |
13 | 14 | async def fetch_access_token(self, request_token: dict[str, Any] | None = None, **kwargs) -> dict[str, Any]: ... |
14 | 15 |
|
15 | 16 | class AsyncOAuth2Mixin(OAuth2Base): |
16 | 17 | async def load_server_metadata(self) -> dict[str, Any]: ... |
17 | | - async def request(self, method, url, token=None, **kwargs): ... |
| 18 | + async def request(self, method: str, url: str, token: dict[str, Any] | None =None, **kwargs) -> requests.Response: ... |
18 | 19 | async def create_authorization_url(self, redirect_uri: str | None = None, **kwargs) -> dict[str, Any]: ... |
19 | 20 | async def fetch_access_token(self, redirect_uri: str | None = None, **kwargs) -> dict[str, Any]: ... |
0 commit comments