diff options
author | BonfaceKilz | 2020-08-19 03:45:49 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-08-19 03:45:49 +0300 |
commit | 3aaa28ea762c496eeb84e09e45194e3fd2a51673 (patch) | |
tree | a572b34f4237fefd02eaba12bbe1aeac74d77497 /wqflask/utility | |
parent | 9d5dff44fb4d07f926659dde0c6205bf12a1ca5b (diff) | |
download | genenetwork2-3aaa28ea762c496eeb84e09e45194e3fd2a51673.tar.gz |
Make Python more idiomatic
Run `2to3-3.8 -f idioms -w .`
See: <https://docs.python.org/2/library/2to3.html#2to3fixer-idioms>
Diffstat (limited to 'wqflask/utility')
-rw-r--r-- | wqflask/utility/authentication_tools.py | 2 | ||||
-rw-r--r-- | wqflask/utility/svg.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/utility/authentication_tools.py b/wqflask/utility/authentication_tools.py index ece7022c..bc03eb55 100644 --- a/wqflask/utility/authentication_tools.py +++ b/wqflask/utility/authentication_tools.py @@ -17,7 +17,7 @@ logger = logging.getLogger(__name__ ) def check_resource_availability(dataset, trait_id=None): #At least for now assume temporary entered traits are accessible - if type(dataset) == str: + if isinstance(dataset, str): return webqtlConfig.DEFAULT_PRIVILEGES if dataset.type == "Temp": return webqtlConfig.DEFAULT_PRIVILEGES diff --git a/wqflask/utility/svg.py b/wqflask/utility/svg.py index 872f22fe..874ada9d 100644 --- a/wqflask/utility/svg.py +++ b/wqflask/utility/svg.py @@ -332,7 +332,7 @@ class SVGelement: f.write('\n'+'\t'*(level+2)+line) f.write('\n'+'\t'*(level+1)+']]>\n') if self.text: - if type(self.text) == type(''): # If the text is only text + if isinstance(self.text, type('')): # If the text is only text f.write(_escape(str(self.text))) else: # If the text is a spannedtext class f.write(str(self.text)) |