example for rm extra cast (#24646)

This commit is contained in:
Asuka Minato 2025-08-28 10:37:39 +09:00 committed by GitHub
commit 4adf85d7d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View file

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