Changed the type hint of the "current_user" pseudo property of the AbstractUserUtils class to return None when the user has not logged in.

This commit is contained in:
2023-02-07 14:12:22 +08:00
committed by 依瑪貓
parent dc24af1db0
commit 31dc8fab04
2 changed files with 6 additions and 5 deletions

View File

@ -80,7 +80,7 @@ def create_app(is_testing: bool = False) -> Flask:
return auth.User.id
@property
def current_user(self) -> auth.User:
def current_user(self) -> auth.User | None:
return auth.current_user()
def get_by_username(self, username: str) -> auth.User | None: