aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance/set_resource_defaults.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-04-30 12:16:51 +0300
committerBonfaceKilz2021-04-30 13:45:15 +0300
commitc7e661b8ff9f70955418fbc4527378904beb0cf4 (patch)
tree7a164b42d46e15b6f2775a50137b412c8713e2f3 /wqflask/maintenance/set_resource_defaults.py
parent385da724b63f57d0fb1bbe3476cea31ef837c081 (diff)
downloadgenenetwork2-c7e661b8ff9f70955418fbc4527378904beb0cf4.tar.gz
autopep8: Fix E20-E27
Run: python -m autopep8 --in-place --recrusive ./ --select\ E20,E211,E22,E224,E224,E225,E226,E227,E228,E231,E241,\ E242,E251,E252,E26,E265,E266,E27 -p 3
Diffstat (limited to 'wqflask/maintenance/set_resource_defaults.py')
-rw-r--r--wqflask/maintenance/set_resource_defaults.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/wqflask/maintenance/set_resource_defaults.py b/wqflask/maintenance/set_resource_defaults.py
index 4177c124..286094dd 100644
--- a/wqflask/maintenance/set_resource_defaults.py
+++ b/wqflask/maintenance/set_resource_defaults.py
@@ -43,10 +43,10 @@ def parse_db_uri():
parsed_uri = urllib.parse.urlparse(SQL_URI)
db_conn_info = dict(
- db = parsed_uri.path[1:],
- host = parsed_uri.hostname,
- user = parsed_uri.username,
- passwd = parsed_uri.password)
+ db=parsed_uri.path[1:],
+ host=parsed_uri.hostname,
+ user=parsed_uri.username,
+ passwd=parsed_uri.password)
print(db_conn_info)
return db_conn_info
@@ -63,14 +63,14 @@ def insert_probeset_resources(default_owner_id):
resource_ob = {}
resource_ob['name'] = resource[1]
resource_ob['owner_id'] = default_owner_id
- resource_ob['data'] = { "dataset" : str(resource[0])}
+ resource_ob['data'] = {"dataset": str(resource[0])}
resource_ob['type'] = "dataset-probeset"
if resource[2] < 1 and resource[3] > 0:
- resource_ob['default_mask'] = { "data": "view",
+ resource_ob['default_mask'] = {"data": "view",
"metadata": "view",
"admin": "not-admin"}
else:
- resource_ob['default_mask'] = { "data": "no-access",
+ resource_ob['default_mask'] = {"data": "no-access",
"metadata": "no-access",
"admin": "not-admin"}
resource_ob['group_masks'] = {}
@@ -97,10 +97,10 @@ def insert_publish_resources(default_owner_id):
else:
resource_ob['name'] = str(resource[0])
resource_ob['owner_id'] = default_owner_id
- resource_ob['data'] = { "dataset" : str(resource[1]) ,
- "trait" : str(resource[0])}
+ resource_ob['data'] = {"dataset": str(resource[1]),
+ "trait": str(resource[0])}
resource_ob['type'] = "dataset-publish"
- resource_ob['default_mask'] = { "data": "view",
+ resource_ob['default_mask'] = {"data": "view",
"metadata": "view",
"admin": "not-admin"}
@@ -125,14 +125,14 @@ def insert_geno_resources(default_owner_id):
resource_ob['owner_id'] = "c5ce8c56-78a6-474f-bcaf-7129d97f56ae"
else:
resource_ob['owner_id'] = default_owner_id
- resource_ob['data'] = { "dataset" : str(resource[0]) }
+ resource_ob['data'] = {"dataset": str(resource[0])}
resource_ob['type'] = "dataset-geno"
if resource[2] < 1:
- resource_ob['default_mask'] = { "data": "view",
+ resource_ob['default_mask'] = {"data": "view",
"metadata": "view",
"admin": "not-admin"}
else:
- resource_ob['default_mask'] = { "data": "no-access",
+ resource_ob['default_mask'] = {"data": "no-access",
"metadata": "no-access",
"admin": "not-admin"}
resource_ob['group_masks'] = {}