aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/jobs.py1
-rw-r--r--qc_app/parse.py10
2 files changed, 8 insertions, 3 deletions
diff --git a/qc_app/jobs.py b/qc_app/jobs.py
index 5f351d4..10ba832 100644
--- a/qc_app/jobs.py
+++ b/qc_app/jobs.py
@@ -7,7 +7,6 @@ from uuid import uuid4
from datetime import timedelta
from redis import Redis
-from flask import current_app as app
def error_filename(job_id, error_dir):
"Compute the path of the file where errors will be dumped."
diff --git a/qc_app/parse.py b/qc_app/parse.py
index 70ef551..ceb8fcf 100644
--- a/qc_app/parse.py
+++ b/qc_app/parse.py
@@ -10,8 +10,14 @@ from quality_control.errors import InvalidValue, DuplicateHeading
from . import jobs
parsebp = Blueprint("parse", __name__)
-isinvalidvalue = lambda item: isinstance(item, InvalidValue)
-isduplicateheading = lambda item: isinstance(item, DuplicateHeading)
+
+def isinvalidvalue(item):
+ """Check whether item is of type InvalidValue"""
+ return isinstance(item, InvalidValue)
+
+def isduplicateheading(item):
+ """Check whether item is of type DuplicateHeading"""
+ return isinstance(item, DuplicateHeading)
@parsebp.route("/parse", methods=["GET"])
def parse():