From 03b2ee98a1a2da648684e5a1a02c7f8c5b45ddd8 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 24 Sep 2024 10:31:48 -0500 Subject: typing: Fix type errors --- uploader/genotypes/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'uploader/genotypes/models.py') diff --git a/uploader/genotypes/models.py b/uploader/genotypes/models.py index 1fe5929..db8cc3e 100644 --- a/uploader/genotypes/models.py +++ b/uploader/genotypes/models.py @@ -32,7 +32,7 @@ def genotype_markers( ) -> tuple[dict, ...]: """Retrieve markers from the database.""" _query = "SELECT * FROM Geno WHERE SpeciesId=%s" - if bool(limit) and limit > 0: + if bool(limit) and limit > 0:# type: ignore[operator] _query = _query + f" LIMIT {limit} OFFSET {offset}" with conn.cursor(cursorclass=DictCursor) as cursor: @@ -59,7 +59,7 @@ def genotype_dataset( _params = (species_id, population_id) if bool(dataset_id): _query = _query + " AND gf.Id=%s" - _params = _params + (dataset_id,) + _params = _params + (dataset_id,)# type: ignore[assignment] with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute(_query, _params) -- cgit v1.2.3