From 2a6478f3cf5069e176b6570535d3e2f8baf0fbaa Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Sat, 20 Aug 2022 14:53:49 +0100 Subject: [PATCH] Clean up unnecessary exception imports --- ref-test/app/__init__.py | 1 - ref-test/app/admin/views.py | 1 - ref-test/app/tools/forms.py | 4 ---- ref-test/app/tools/test.py | 1 - ref-test/app/view/views.py | 1 - ref-test/reset.py | 2 -- 6 files changed, 10 deletions(-) diff --git a/ref-test/app/__init__.py b/ref-test/app/__init__.py index 4d57810..be5f4bf 100644 --- a/ref-test/app/__init__.py +++ b/ref-test/app/__init__.py @@ -7,7 +7,6 @@ from flask import flash, Flask, render_template, request from flask.helpers import abort, url_for from flask.json import jsonify from flask_wtf.csrf import CSRFError -from sqlalchemy.exc import SQLAlchemyError from werkzeug.middleware.proxy_fix import ProxyFix from datetime import datetime diff --git a/ref-test/app/admin/views.py b/ref-test/app/admin/views.py index a5bdf6e..5b49cde 100644 --- a/ref-test/app/admin/views.py +++ b/ref-test/app/admin/views.py @@ -9,7 +9,6 @@ from ..tools.test import answer_options, get_correct_answers from flask import abort, Blueprint, jsonify, render_template, request, send_file, session from flask.helpers import abort, flash, redirect, url_for from flask_login import current_user, login_required -from sqlalchemy.exc import SQLAlchemyError from datetime import date, datetime, timedelta from json import loads diff --git a/ref-test/app/tools/forms.py b/ref-test/app/tools/forms.py index df504ce..4273648 100644 --- a/ref-test/app/tools/forms.py +++ b/ref-test/app/tools/forms.py @@ -3,12 +3,8 @@ from ..extensions import db from ..tools.logs import write from flask import jsonify -from sqlalchemy.exc import SQLAlchemyError from wtforms.validators import ValidationError -import json -from sqlalchemy.ext import mutable - def value(min:int=0, max:int=None): if not max: message = f'Value must be greater than {min}.' diff --git a/ref-test/app/tools/test.py b/ref-test/app/tools/test.py index 13c0f16..ec80a38 100644 --- a/ref-test/app/tools/test.py +++ b/ref-test/app/tools/test.py @@ -4,7 +4,6 @@ from ..tools.logs import write from flask import request, session from flask.helpers import abort, redirect, url_for -from sqlalchemy.exc import SQLAlchemyError from functools import wraps diff --git a/ref-test/app/view/views.py b/ref-test/app/view/views.py index 53729e6..524fe12 100644 --- a/ref-test/app/view/views.py +++ b/ref-test/app/view/views.py @@ -7,7 +7,6 @@ from ..tools.logs import write from flask import Blueprint, jsonify, render_template, request from flask.helpers import abort, flash, redirect, url_for from flask_login import login_required -from sqlalchemy.exc import SQLAlchemyError view = Blueprint( name='view', diff --git a/ref-test/reset.py b/ref-test/reset.py index f0106ea..e74a13c 100644 --- a/ref-test/reset.py +++ b/ref-test/reset.py @@ -2,8 +2,6 @@ from main import app from app.models import User -from sqlalchemy.exc import SQLAlchemyError - import sys from getpass import getpass