aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/heatmaps.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-02-21 16:23:06 +0300
committerFrederick Muriuki Muriithi2022-02-21 16:23:06 +0300
commita35fce27875d9db80dce1976b6f8ee8c00ecfe0a (patch)
tree8e8f815a6e3d37348bdb8f253f5ec53f72dc2dbc /gn3/api/heatmaps.py
parentc84b07b8c5ac0a42c0fab929c75823b30b548191 (diff)
downloadgenenetwork3-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 'gn3/api/heatmaps.py')
-rw-r--r--gn3/api/heatmaps.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gn3/api/heatmaps.py b/gn3/api/heatmaps.py
index 633a061..b2511c3 100644
--- a/gn3/api/heatmaps.py
+++ b/gn3/api/heatmaps.py
@@ -27,8 +27,7 @@ def clustered_heatmaps():
conn, _cursor = database_connector()
def parse_trait_fullname(trait):
name_parts = trait.split(":")
- return "{dataset_name}::{trait_name}".format(
- dataset_name=name_parts[1], trait_name=name_parts[0])
+ return f"{name_parts[1]}::{name_parts[0]}"
traits_fullnames = [parse_trait_fullname(trait) for trait in traits_names]
with io.StringIO() as io_str: