mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-10-29 00:18:08 +08:00
Drop Python 3.9 support
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
from datetime import datetime
|
||||
from typing import Any, Generic, Optional, Protocol
|
||||
from typing import Any, Generic, Protocol
|
||||
|
||||
from fastapi_users.authentication.strategy.db.models import AP
|
||||
|
||||
@ -8,8 +8,8 @@ class AccessTokenDatabase(Protocol, Generic[AP]):
|
||||
"""Protocol for retrieving, creating and updating access tokens from a database."""
|
||||
|
||||
async def get_by_token(
|
||||
self, token: str, max_age: Optional[datetime] = None
|
||||
) -> Optional[AP]:
|
||||
self, token: str, max_age: datetime | None = None
|
||||
) -> AP | None:
|
||||
"""Get a single access token by token."""
|
||||
... # pragma: no cover
|
||||
|
||||
|
||||
Reference in New Issue
Block a user