diff --git a/bemani/data/mysql/base.py b/bemani/data/mysql/base.py index 1d7ff03..5397a01 100644 --- a/bemani/data/mysql/base.py +++ b/bemani/data/mysql/base.py @@ -160,7 +160,9 @@ class BaseData: """ # Create a new session that is unique while True: - session = "".join(random.choice(string.digits + string.ascii_lowercase) for _ in range(BaseData.SESSION_LENGTH)) + session = "".join( + random.choice(string.digits + string.ascii_lowercase) for _ in range(BaseData.SESSION_LENGTH) + ) sql = "SELECT session FROM session WHERE session = :session" cursor = self.execute(sql, {"session": session}) if cursor.rowcount == 0: diff --git a/bemani/frontend/account/account.py b/bemani/frontend/account/account.py index 91af600..4ac1c2c 100644 --- a/bemani/frontend/account/account.py +++ b/bemani/frontend/account/account.py @@ -76,10 +76,18 @@ def viewlogin() -> Response: def recover_display(username: str, token: Optional[str], card_number: Optional[str]) -> Response: - return Response(render_template( - "account/recover.html", - **{"title": "Recover Password", "show_navigation": False, "token": token, "card_number": card_number, "username": username}, - )) + return Response( + render_template( + "account/recover.html", + **{ + "title": "Recover Password", + "show_navigation": False, + "token": token, + "card_number": card_number, + "username": username, + }, + ) + ) @account_pages.route("/recover", methods=["POST"]) diff --git a/bemani/frontend/app.py b/bemani/frontend/app.py index d0a9dcb..b2c90d0 100644 --- a/bemani/frontend/app.py +++ b/bemani/frontend/app.py @@ -355,7 +355,7 @@ def navigation() -> Dict[str, Any]: ] custom_config = {} if g.config.server.allow_raw_ids: - custom_config['allow_raw_ids'] = True + custom_config["allow_raw_ids"] = True # Look up the logged in user ID. try: