From 0c8642d08f88d2dcf8e82a7b58c9922e01c20102 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 25 Sep 2024 12:10:38 -0500 Subject: Lint: Fix myriad of linting issues --- uploader/genotypes/views.py | 4 ++-- uploader/platforms/models.py | 2 +- uploader/platforms/views.py | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'uploader') diff --git a/uploader/genotypes/views.py b/uploader/genotypes/views.py index f79caba..3c20b52 100644 --- a/uploader/genotypes/views.py +++ b/uploader/genotypes/views.py @@ -78,7 +78,7 @@ def select_population(species: dict, species_id: int): @require_login @with_population(species_redirect_uri="species.populations.genotypes.index", redirect_uri="species.populations.genotypes.select_population") -def list_genotypes(species: dict, population: dict, **kwargs): +def list_genotypes(species: dict, population: dict, **kwargs):# pylint: disable=[unused-argument] """List genotype details for species and population.""" with database_connection(app.config["SQL_URI"]) as conn: return render_template("genotypes/list-genotypes.html", @@ -97,7 +97,7 @@ def list_genotypes(species: dict, population: dict, **kwargs): @genotypesbp.route("//genotypes/list-markers", methods=["GET"]) @require_login @with_species(redirect_uri="species.populations.genotypes.index") -def list_markers(species: dict, **kwargs): +def list_markers(species: dict, **kwargs):# pylint: disable=[unused-argument] """List a species' genetic markers.""" with database_connection(app.config["SQL_URI"]) as conn: start_from = max(safe_int(request.args.get("start_from") or 0), 0) diff --git a/uploader/platforms/models.py b/uploader/platforms/models.py index 199f2df..a859371 100644 --- a/uploader/platforms/models.py +++ b/uploader/platforms/models.py @@ -49,7 +49,7 @@ def platform_by_species_and_id( with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute("SELECT * FROM GeneChip WHERE SpeciesId=%s AND Id=%s", (species_id, platformid)) - result = cursor.fetchone() + result = cursor.fetchone()#pylint: disable=[duplicate-code] if bool(result): return dict(result) diff --git a/uploader/platforms/views.py b/uploader/platforms/views.py index 2ff45b8..2d61b6a 100644 --- a/uploader/platforms/views.py +++ b/uploader/platforms/views.py @@ -16,8 +16,7 @@ from uploader.datautils import safe_int, order_by_family, enumerate_sequence from .models import (save_new_platform, platforms_by_species, - species_platforms_count, - platform_by_species_and_id) + species_platforms_count) platformsbp = Blueprint("platforms", __name__) render_template = make_template_renderer("platforms") @@ -88,7 +87,7 @@ def create_platform(species_id: int): try: form = request.form - new_platform = save_new_platform( + _new_platform = save_new_platform( cursor, species_id, form["geo-platform"], -- cgit v1.2.3