From 19b2a334e4b3f473cef9cc44b53b4c0c833ea020 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 27 Oct 2020 11:06:43 +0100 Subject: [PATCH] Remove unused imports --- cps/config_sql.py | 1 - cps/converter.py | 1 - cps/editbooks.py | 1 - cps/helper.py | 2 +- cps/jinjia.py | 1 - cps/kobo.py | 2 +- cps/tasks/convert.py | 2 +- cps/web.py | 2 +- 8 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cps/config_sql.py b/cps/config_sql.py index d5c7b213..9dcb4528 100644 --- a/cps/config_sql.py +++ b/cps/config_sql.py @@ -19,7 +19,6 @@ from __future__ import division, print_function, unicode_literals import os -import json import sys from sqlalchemy import exc, Column, String, Integer, SmallInteger, Boolean, BLOB, JSON diff --git a/cps/converter.py b/cps/converter.py index 01a6fbc7..2ff73666 100644 --- a/cps/converter.py +++ b/cps/converter.py @@ -19,7 +19,6 @@ from __future__ import division, print_function, unicode_literals import os import re -import sys from flask_babel import gettext as _ from . import config, logger diff --git a/cps/editbooks.py b/cps/editbooks.py index 7f7764e5..323b0fb9 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -27,7 +27,6 @@ import json from shutil import copyfile from uuid import uuid4 -from babel import Locale as LC from flask import Blueprint, request, flash, redirect, url_for, abort, Markup, Response from flask_babel import gettext as _ from flask_login import current_user, login_required diff --git a/cps/helper.py b/cps/helper.py index 82d0b232..c0972687 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -35,7 +35,7 @@ from babel.units import format_unit from flask import send_from_directory, make_response, redirect, abort, url_for from flask_babel import gettext as _ from flask_login import current_user -from sqlalchemy.sql.expression import true, false, and_, text, func +from sqlalchemy.sql.expression import true, false, and_, text from werkzeug.datastructures import Headers from werkzeug.security import generate_password_hash from . import calibre_db diff --git a/cps/jinjia.py b/cps/jinjia.py index abe1ba15..ebb53a30 100644 --- a/cps/jinjia.py +++ b/cps/jinjia.py @@ -25,7 +25,6 @@ from __future__ import division, print_function, unicode_literals import datetime import mimetypes -import re from babel.dates import format_date from flask import Blueprint, request, url_for diff --git a/cps/kobo.py b/cps/kobo.py index a6dfc3f6..7a05ea5d 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -39,7 +39,7 @@ from flask import ( redirect, abort ) -from flask_login import current_user, login_required +from flask_login import current_user from werkzeug.datastructures import Headers from sqlalchemy import func from sqlalchemy.sql.expression import and_, or_ diff --git a/cps/tasks/convert.py b/cps/tasks/convert.py index b60d4976..659c6e9c 100644 --- a/cps/tasks/convert.py +++ b/cps/tasks/convert.py @@ -8,7 +8,7 @@ from shutil import copyfile from sqlalchemy.exc import SQLAlchemyError -from cps.services.worker import CalibreTask, STAT_FINISH_SUCCESS +from cps.services.worker import CalibreTask from cps import calibre_db, db from cps import logger, config from cps.subproc_wrapper import process_open diff --git a/cps/web.py b/cps/web.py index aa1cac1a..45ae99ea 100644 --- a/cps/web.py +++ b/cps/web.py @@ -41,7 +41,7 @@ from flask_login import login_user, logout_user, login_required, current_user, c from sqlalchemy.exc import IntegrityError, InvalidRequestError, OperationalError from sqlalchemy.sql.expression import text, func, true, false, not_, and_, or_ from sqlalchemy.orm.attributes import flag_modified -from werkzeug.exceptions import default_exceptions, InternalServerError +from werkzeug.exceptions import default_exceptions from sqlalchemy.sql.functions import coalesce from .services.worker import WorkerThread