From a35fce27875d9db80dce1976b6f8ee8c00ecfe0a Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 21 Feb 2022 16:23:06 +0300 Subject: Fix a myriad of linter issues * Use `with` in place of plain `open` * Use f-strings in place of `str.format()` * Remove string interpolation from queries - provide data as query parameters * other minor fixes --- tests/performance/perf_query.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/performance') diff --git a/tests/performance/perf_query.py b/tests/performance/perf_query.py index 12cb944..c22dcf5 100644 --- a/tests/performance/perf_query.py +++ b/tests/performance/perf_query.py @@ -42,7 +42,7 @@ def query_executor(query: str, def fetch_probeset_query(dataset_name: str): """contains queries for datasets""" - query = """SELECT * from ProbeSetData + query = f"""SELECT * from ProbeSetData where StrainID in (4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 29, 30, 31, 35, 36, 37, 39, 98, 99, 100, 103, @@ -53,8 +53,8 @@ def fetch_probeset_query(dataset_name: str): and id in (SELECT ProbeSetXRef.DataId FROM (ProbeSet, ProbeSetXRef, ProbeSetFreeze) WHERE ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id - and ProbeSetFreeze.Name = '{}' - and ProbeSet.Id = ProbeSetXRef.ProbeSetId)""".format(dataset_name) + and ProbeSetFreeze.Name = '{dataset_name}' + and ProbeSet.Id = ProbeSetXRef.ProbeSetId)""" return query -- cgit v1.2.3