diff --git a/nateman/__init__.py b/nateman/__init__.py index 1652020..8b18b52 100644 --- a/nateman/__init__.py +++ b/nateman/__init__.py @@ -26,9 +26,8 @@ import sys from datetime import datetime import sqlalchemy -from flask import abort, Flask, request, send_from_directory +from flask import Flask from flask.logging import default_handler -from werkzeug.utils import find_modules, import_string from . import util from .config_manager import config_file_exists, create_config_file, config diff --git a/nateman/blueprints/fileio.py b/nateman/blueprints/fileio.py index a43cd7a..14cb4f2 100644 --- a/nateman/blueprints/fileio.py +++ b/nateman/blueprints/fileio.py @@ -21,10 +21,10 @@ Export- und Import-Blueprint import os import tempfile from datetime import datetime +from pyexpat import ExpatError from flask import abort, Blueprint, current_app, g, redirect, url_for, flash, request, render_template from openpyxl.utils.exceptions import InvalidFileException -from pyexpat import ExpatError from .auth import beratungslehrer_required, admin_required from .. import exporter, util diff --git a/nateman/blueprints/klausuren.py b/nateman/blueprints/klausuren.py index e4fa101..4b2a881 100644 --- a/nateman/blueprints/klausuren.py +++ b/nateman/blueprints/klausuren.py @@ -25,8 +25,7 @@ from flask import Blueprint, abort, current_app, flash, g, redirect, render_temp from .auth import login_required, beratungslehrer_required from ..config_manager import config -from ..models import Klausur, Klausurteilnahme, Lehrer, Schueler, db, \ - get_next_new_schueler_id, Stufe +from ..models import Klausur, Klausurteilnahme, Lehrer, Schueler, db, get_next_new_schueler_id, Stufe bp = Blueprint("klausuren", __name__, url_prefix="/klausuren") diff --git a/nateman/commands.py b/nateman/commands.py index 852a9e1..99de468 100644 --- a/nateman/commands.py +++ b/nateman/commands.py @@ -22,11 +22,9 @@ Enthält Befehle zur Verwendung im Terminal (Command Line Interface). import click from flask.cli import with_appcontext -from nateman.exporter import excelexport -from nateman.importer import excelimport, KoopSchuelerImportError -from . import emails, util, assigner -from .models import Lehrer, Stufe, db, Session +from . import emails, util from .config_manager import config +from .models import Lehrer, Stufe, db, Session @click.group() diff --git a/nateman/models.py b/nateman/models.py index 7b8ab74..9da4170 100644 --- a/nateman/models.py +++ b/nateman/models.py @@ -29,7 +29,6 @@ from sqlalchemy.engine import Engine from sqlalchemy.sql import func from . import util -from .config_manager import config db: SQLAlchemy = SQLAlchemy() diff --git a/nateman/util.py b/nateman/util.py index 4448258..0baed27 100644 --- a/nateman/util.py +++ b/nateman/util.py @@ -22,8 +22,6 @@ Enthält nützliche, von NateMan unabhängige Funktionen. import random import re -from datetime import date - EMAIL_ADDRESS_REGEX = re.compile(r"^[a-zA-Z0-9!#$%&‘*+–/=?^_`{|}~](\.?[a-zA-Z0-9!#$%&‘*+–/=?^_`{|}~])*" r"@[a-zA-Z0-9-](\.?[a-zA-Z0-9-])*$")