diff options
author | Frederick Muriuki Muriithi | 2022-02-21 16:23:06 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-02-21 16:23:06 +0300 |
commit | a35fce27875d9db80dce1976b6f8ee8c00ecfe0a (patch) | |
tree | 8e8f815a6e3d37348bdb8f253f5ec53f72dc2dbc /tests/performance | |
parent | c84b07b8c5ac0a42c0fab929c75823b30b548191 (diff) | |
download | genenetwork3-a35fce27875d9db80dce1976b6f8ee8c00ecfe0a.tar.gz |
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
Diffstat (limited to 'tests/performance')
-rw-r--r-- | tests/performance/perf_query.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 |