aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/harvest
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:55:15 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:55:22 -0700
commit6fa2d38be243531747241a3ae602069d507368d9 (patch)
tree7cc81446a97a372640f6a189f09b88fa466e77ce /python/fatcat_tools/harvest
parent367b06f64546e4533662017c9dbe72aca175a294 (diff)
downloadfatcat-6fa2d38be243531747241a3ae602069d507368d9.tar.gz
fatcat-6fa2d38be243531747241a3ae602069d507368d9.zip
lint: simple, safe inline lint fixes
'==' vs 'is'; 'not a in b' vs 'a not in b'; etc
Diffstat (limited to 'python/fatcat_tools/harvest')
-rw-r--r--python/fatcat_tools/harvest/harvest_common.py2
-rw-r--r--python/fatcat_tools/harvest/pubmed.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_tools/harvest/harvest_common.py b/python/fatcat_tools/harvest/harvest_common.py
index bdae3054..5e7702d9 100644
--- a/python/fatcat_tools/harvest/harvest_common.py
+++ b/python/fatcat_tools/harvest/harvest_common.py
@@ -77,7 +77,7 @@ class HarvestState:
current = start_date
while current <= end_date:
- if not current in self.completed:
+ if current not in self.completed:
self.to_process.add(current)
current += datetime.timedelta(days=1)
diff --git a/python/fatcat_tools/harvest/pubmed.py b/python/fatcat_tools/harvest/pubmed.py
index 92798a99..ee55f4eb 100644
--- a/python/fatcat_tools/harvest/pubmed.py
+++ b/python/fatcat_tools/harvest/pubmed.py
@@ -301,7 +301,7 @@ def xmlstream(filename, tag, encoding='utf-8'):
Known vulnerabilities: https://docs.python.org/3/library/xml.html#xml-vulnerabilities
"""
def strip_ns(tag):
- if not '}' in tag:
+ if '}' not in tag:
return tag
return tag.split('}')[1]