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:
finnandClaude Opus 5.5 committed 2026-10-21 09:06:51 +00:00
1 parent 340006ff37
commit 91e95b1947
7 files changed
+1 -12

No files matched your search

-1
View File
@@ -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}"
-1
View File
@@ -9,7 +9,6 @@ from max.views import redirect
from .auth import logout
DEBUG_DEFAULT_LOGIN = False
-1
View File
@@ -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
-1
View File
@@ -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")
-1
View File
@@ -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"
-1
View File
@@ -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\-]+)?")
+1 -6
View File
@@ -2,12 +2,7 @@
max_line_length = 96
[isort]
include_trailing_comma = true
multi_line_output = 3
lines_after_imports = 2
profile = black
combine_as_imports = true
force_grid_wrap = 0
use_parentheses = true
line_length = 88
known_first_party = max
known_third_party = flask