aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-11-15 09:29:00 +0300
committerFrederick Muriuki Muriithi2023-11-15 09:29:00 +0300
commitaae9d6d988867b9b3edba800857830b48668599c (patch)
treeeb438bb45cea3a63e68e9470afce58b47dd64b4c /qc_app
parentfcd4b6fac4296d2b6975e1504dd57d7fc59d3dd5 (diff)
downloadgn-uploader-aae9d6d988867b9b3edba800857830b48668599c.tar.gz
Linting: Fix linting errors.
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():