Make isort compatible with black
isort's lines_after_imports = 2 conflicted with black, so run-cleanup reverted black's changes. Use isort's black profile instead and apply the resulting formatting. Also fix the flake8 errors in check_email_mixin and drop a leftover debug print. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
340006ff37
commit
91e95b1947
7 files changed
+1
-12
No files matched your search
@@ -8,7 +8,6 @@ from max.crypto import constant_time_compare, force_bytes
|
||||
from max.db import get_user_by_email, update_user
|
||||
from max.translations import t
|
||||
|
||||
|
||||
SSHA512_PREFIX = "{SSHA512}"
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ from max.views import redirect
|
||||
|
||||
from .auth import logout
|
||||
|
||||
|
||||
DEBUG_DEFAULT_LOGIN = False
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from flask import request, session
|
||||
from max.crypto import constant_time_compare, get_random_string
|
||||
from max.middlewares import BaseMiddleware
|
||||
|
||||
|
||||
CSRF_TOKEN_KEY = "csrf_token"
|
||||
CSRF_TOKEN_LENGTH = 32
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ class CheckEmailMixin:
|
||||
def is_email_valid(self, email: str):
|
||||
"""Checks for the email being valid and that it has a valid domain."""
|
||||
regex = re.compile(f"^[a-zA-Z0-9+_-]+@({'|'.join(get_domains())})$")
|
||||
print(regex, email)
|
||||
match = regex.match(email)
|
||||
if not match:
|
||||
flash(t("The email is not valid"), category="error")
|
||||
|
||||
@@ -6,7 +6,6 @@ from flask import current_app, send_from_directory
|
||||
from max.permissions import AllowAnyAccess
|
||||
from max.views import BaseView
|
||||
|
||||
|
||||
FAVICON_FOLDER = "private_static/favicons"
|
||||
STATE_FAVICON_ATTR = "available_favicons"
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import json
|
||||
import os
|
||||
import re
|
||||
|
||||
|
||||
ACCEPT_LANGUAGE_HEADER_REGEX = re.compile(r"([a-zA-Z]{2,3})(-[a-zA-Z\-]+)?")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user