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/base/trait.py | |
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/base/trait.py')
-rw-r--r-- | wqflask/base/trait.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 7666348e..e82df226 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -118,7 +118,7 @@ class GeneralTrait(object): vals = [] the_vars = [] sample_aliases = [] - for sample_name, sample_data in self.data.items(): + for sample_name, sample_data in list(self.data.items()): if sample_data.value != None: if not include_variance or sample_data.variance != None: samples.append(sample_name) @@ -260,7 +260,7 @@ def get_sample_data(): trait_dict['pubmed_link'] = trait_ob.pubmed_link trait_dict['pubmed_text'] = trait_ob.pubmed_text - return json.dumps([trait_dict, {key: value.value for key, value in trait_ob.data.iteritems() }]) + return json.dumps([trait_dict, {key: value.value for key, value in list(trait_ob.data.items()) }]) else: return None |