example for rm extra cast (#24646)
This commit is contained in:
parent
7995ff1410
commit
4adf85d7d4
2 changed files with 3 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import enum
|
||||
import secrets
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from typing import Any, Optional, cast
|
||||
from typing import Any, Optional
|
||||
|
||||
from werkzeug.exceptions import NotFound, Unauthorized
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ class WebAppAuthService:
|
|||
if account.password is None or not compare_password(password, account.password, account.password_salt):
|
||||
raise AccountPasswordError("Invalid email or password.")
|
||||
|
||||
return cast(Account, account)
|
||||
return account
|
||||
|
||||
@classmethod
|
||||
def login(cls, account: Account) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue