diff options
author | BonfaceKilz | 2020-08-19 02:31:31 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-08-19 02:34:42 +0300 |
commit | ba123e1e0fe693f9778993c3f8e5a70a28658a4c (patch) | |
tree | 6d02bac212da1bfeeb8330b94971383cde053602 /wqflask/maintenance | |
parent | bafbb5b7a4b7db2ca230f292eb45be7e67985259 (diff) | |
download | genenetwork2-ba123e1e0fe693f9778993c3f8e5a70a28658a4c.tar.gz |
Fix dictionary iteration methods
Run `2to3-3.8 -f dict -w .`
See: <https://docs.python.org/2/library/2to3.html#2to3fixer-dict> and
<https://stackoverflow.com/questions/17695456/why-does-python-3-need-dict-items-to-be-wrapped-with-list>
Diffstat (limited to 'wqflask/maintenance')
-rw-r--r-- | wqflask/maintenance/gen_select_dataset.py | 6 | ||||
-rw-r--r-- | wqflask/maintenance/generate_probesetfreeze_file.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py index 647e58a2..78217587 100644 --- a/wqflask/maintenance/gen_select_dataset.py +++ b/wqflask/maintenance/gen_select_dataset.py @@ -108,7 +108,7 @@ def get_types(groups): """Build types list""" types = {} #print("Groups: ", pf(groups)) - for species, group_dict in groups.iteritems(): + for species, group_dict in list(groups.items()): types[species] = {} for group_name, _group_full_name in group_dict: # make group an alias to shorten the code @@ -195,9 +195,9 @@ def build_types(species, group): def get_datasets(types): """Build datasets list""" datasets = {} - for species, group_dict in types.iteritems(): + for species, group_dict in list(types.items()): datasets[species] = {} - for group, type_list in group_dict.iteritems(): + for group, type_list in list(group_dict.items()): datasets[species][group] = {} for type_name in type_list: these_datasets = build_datasets(species, group, type_name[0]) diff --git a/wqflask/maintenance/generate_probesetfreeze_file.py b/wqflask/maintenance/generate_probesetfreeze_file.py index b7b2dc8e..4231cc7c 100644 --- a/wqflask/maintenance/generate_probesetfreeze_file.py +++ b/wqflask/maintenance/generate_probesetfreeze_file.py @@ -82,7 +82,7 @@ def get_probeset_vals(cursor, dataset_name): def trim_strains(strains, probeset_vals): trimmed_strains = [] #print("probeset_vals is:", pf(probeset_vals)) - first_probeset = list(probeset_vals.itervalues())[0] + first_probeset = list(probeset_vals.values())[0] print("\n**** first_probeset is:", pf(first_probeset)) for strain in strains: print("\n**** strain is:", pf(strain)) |