diff options
author | Frederick Muriuki Muriithi | 2023-11-15 09:29:00 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-11-15 09:29:00 +0300 |
commit | aae9d6d988867b9b3edba800857830b48668599c (patch) | |
tree | eb438bb45cea3a63e68e9470afce58b47dd64b4c /qc_app | |
parent | fcd4b6fac4296d2b6975e1504dd57d7fc59d3dd5 (diff) | |
download | gn-uploader-aae9d6d988867b9b3edba800857830b48668599c.tar.gz |
Linting: Fix linting errors.
Diffstat (limited to 'qc_app')
-rw-r--r-- | qc_app/jobs.py | 1 | ||||
-rw-r--r-- | qc_app/parse.py | 10 |
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(): |