mirror of
https://github.com/simple-login/app.git
synced 2024-09-27 20:31:30 +02:00
optimize import
This commit is contained in:
parent
adff510359
commit
0a4fc76b61
@ -1,5 +1,6 @@
|
||||
import json
|
||||
import secrets
|
||||
|
||||
import webauthn
|
||||
from flask import (
|
||||
request,
|
||||
|
@ -1,9 +1,9 @@
|
||||
import os
|
||||
import random
|
||||
import socket
|
||||
import string
|
||||
import subprocess
|
||||
from urllib.parse import urlparse
|
||||
import socket
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
|
@ -1,15 +1,13 @@
|
||||
import arrow
|
||||
from flask import render_template, flash, request, redirect, url_for
|
||||
from flask_login import login_required, current_user
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, validators
|
||||
|
||||
from app import s3
|
||||
from app.config import JOB_BATCH_IMPORT
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.extensions import db
|
||||
from app.log import LOG
|
||||
from app.models import CustomDomain, File, BatchImport, Job
|
||||
from app.models import File, BatchImport, Job
|
||||
from app.utils import random_string
|
||||
|
||||
|
||||
|
@ -4,9 +4,7 @@ from itsdangerous import TimestampSigner, SignatureExpired
|
||||
|
||||
from app.config import (
|
||||
DISABLE_ALIAS_SUFFIX,
|
||||
ALIAS_DOMAINS,
|
||||
CUSTOM_ALIAS_SECRET,
|
||||
PREMIUM_ALIAS_DOMAINS,
|
||||
)
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.extensions import db
|
||||
|
@ -3,7 +3,7 @@ from flask_login import login_required, current_user
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, validators
|
||||
|
||||
from app.config import EMAIL_SERVERS_WITH_PRIORITY, ALIAS_DOMAINS
|
||||
from app.config import EMAIL_SERVERS_WITH_PRIORITY
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.email_utils import get_email_domain_part
|
||||
from app.extensions import db
|
||||
|
@ -1,10 +1,10 @@
|
||||
from functools import wraps
|
||||
from time import time
|
||||
|
||||
from flask import render_template, flash, redirect, url_for, session, request
|
||||
from flask_login import login_required, current_user
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import PasswordField, validators
|
||||
from functools import wraps
|
||||
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.log import LOG
|
||||
|
@ -4,10 +4,10 @@ from flask_wtf import FlaskForm
|
||||
from wtforms import HiddenField, validators
|
||||
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.dashboard.views.enter_sudo import sudo_required
|
||||
from app.extensions import db
|
||||
from app.log import LOG
|
||||
from app.models import RecoveryCode, Fido
|
||||
from app.dashboard.views.enter_sudo import sudo_required
|
||||
|
||||
|
||||
class FidoManageForm(FlaskForm):
|
||||
|
@ -1,7 +1,6 @@
|
||||
import json
|
||||
import secrets
|
||||
import uuid
|
||||
from time import time
|
||||
|
||||
import webauthn
|
||||
from flask import render_template, flash, redirect, url_for, session
|
||||
@ -11,10 +10,10 @@ from wtforms import StringField, HiddenField, validators
|
||||
|
||||
from app.config import RP_ID, URL
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.dashboard.views.enter_sudo import sudo_required
|
||||
from app.extensions import db
|
||||
from app.log import LOG
|
||||
from app.models import Fido, RecoveryCode
|
||||
from app.dashboard.views.enter_sudo import sudo_required
|
||||
|
||||
|
||||
class FidoTokenForm(FlaskForm):
|
||||
|
@ -14,7 +14,7 @@ from app.email_utils import email_can_be_used_as_mailbox
|
||||
from app.email_utils import mailbox_already_used, render, send_email
|
||||
from app.extensions import db
|
||||
from app.log import LOG
|
||||
from app.models import Alias, DeletedAlias, AuthorizedAddress
|
||||
from app.models import Alias, AuthorizedAddress
|
||||
from app.models import Mailbox
|
||||
from app.pgp_utils import PGPException, load_public_key
|
||||
|
||||
|
@ -5,9 +5,9 @@ from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, validators
|
||||
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.dashboard.views.enter_sudo import sudo_required
|
||||
from app.extensions import db
|
||||
from app.log import LOG
|
||||
from app.dashboard.views.enter_sudo import sudo_required
|
||||
|
||||
|
||||
class OtpTokenForm(FlaskForm):
|
||||
|
@ -34,7 +34,6 @@ from app.models import (
|
||||
EmailChange,
|
||||
User,
|
||||
Alias,
|
||||
DeletedAlias,
|
||||
CustomDomain,
|
||||
Client,
|
||||
AliasGeneratorEnum,
|
||||
|
@ -1,14 +1,12 @@
|
||||
import email
|
||||
import os
|
||||
import re
|
||||
from email.header import decode_header
|
||||
from email.message import Message
|
||||
from email.mime.base import MIMEBase
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
from email.mime.text import MIMEText
|
||||
from email.utils import make_msgid, formatdate, parseaddr
|
||||
from smtplib import SMTP
|
||||
from typing import Optional
|
||||
import re
|
||||
|
||||
import arrow
|
||||
import dkim
|
||||
@ -32,7 +30,6 @@ from app.config import (
|
||||
SENDER,
|
||||
URL,
|
||||
LANDING_PAGE_URL,
|
||||
PREMIUM_ALIAS_DOMAINS,
|
||||
)
|
||||
from app.dns_utils import get_mx_domains
|
||||
from app.extensions import db
|
||||
|
@ -9,7 +9,7 @@ import bcrypt
|
||||
from arrow import Arrow
|
||||
from flask import url_for
|
||||
from flask_login import UserMixin
|
||||
from sqlalchemy import text, desc, CheckConstraint, and_, func, case
|
||||
from sqlalchemy import text, desc, CheckConstraint
|
||||
from sqlalchemy_utils import ArrowType
|
||||
|
||||
from app import s3
|
||||
@ -24,9 +24,6 @@ from app.config import (
|
||||
LANDING_PAGE_URL,
|
||||
FIRST_ALIAS_DOMAIN,
|
||||
DISABLE_ONBOARDING,
|
||||
PAGE_LIMIT,
|
||||
ALIAS_DOMAINS,
|
||||
PREMIUM_ALIAS_DOMAINS,
|
||||
)
|
||||
from app.errors import AliasInTrashError
|
||||
from app.extensions import db
|
||||
|
@ -7,7 +7,6 @@ from memory_profiler import memory_usage
|
||||
from app.config import GNUPGHOME
|
||||
from app.log import LOG
|
||||
from app.models import Mailbox, Contact
|
||||
from app.utils import random_string
|
||||
|
||||
gpg = gnupg.GPG(gnupghome=GNUPGHOME)
|
||||
gpg.encoding = "utf-8"
|
||||
|
@ -1,7 +1,10 @@
|
||||
"""Inspired from
|
||||
https://github.com/petermat/spamassassin_client
|
||||
"""
|
||||
import socket, select, re, logging
|
||||
import logging
|
||||
import re
|
||||
import select
|
||||
import socket
|
||||
from io import BytesIO
|
||||
|
||||
from app.log import LOG
|
||||
|
Loading…
Reference in New Issue
Block a user