From aae9d6d988867b9b3edba800857830b48668599c Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 15 Nov 2023 09:29:00 +0300 Subject: Linting: Fix linting errors. --- qc_app/jobs.py | 1 - qc_app/parse.py | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'qc_app') 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(): -- cgit v1.2.3