Skip to content

Commit 6d6c149

Browse files
committed
Fix the typing for Python<3.10 versions
1 parent 099ec02 commit 6d6c149

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fastapi_oauth2/security.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
from typing import Any
12
from typing import Callable
3+
from typing import Dict
24
from typing import Optional
5+
from typing import Tuple
36
from typing import Type
47

58
from fastapi.security import OAuth2 as FastAPIOAuth2
@@ -9,7 +12,7 @@
912
from starlette.requests import Request
1013

1114

12-
def use_cookies(cls: Type[FastAPIOAuth2]) -> Callable[[...], FastAPIOAuth2]:
15+
def use_cookies(cls: Type[FastAPIOAuth2]) -> Callable[[Tuple[Any], Dict[str, Any]], FastAPIOAuth2]:
1316
"""OAuth2 classes wrapped with this decorator will use cookies for the Authorization header."""
1417

1518
def _use_cookies(*args, **kwargs) -> FastAPIOAuth2:

0 commit comments

Comments
 (0)