aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/grobid2json.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-03 23:16:07 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-03 23:16:07 -0700
commit62fde540ef9c38d403ea89a6fb1db51bfba23da8 (patch)
tree2142c739349237b0ef137a57000850db1b2ff39d /fatcat_scholar/grobid2json.py
parent74ef1c6f4e0f08dd6a6b3e6eacc4d780c990eb3f (diff)
downloadfatcat-scholar-62fde540ef9c38d403ea89a6fb1db51bfba23da8.tar.gz
fatcat-scholar-62fde540ef9c38d403ea89a6fb1db51bfba23da8.zip
flake8 fixes (partial)
Diffstat (limited to 'fatcat_scholar/grobid2json.py')
-rwxr-xr-xfatcat_scholar/grobid2json.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/fatcat_scholar/grobid2json.py b/fatcat_scholar/grobid2json.py
index 57d039e..4019363 100755
--- a/fatcat_scholar/grobid2json.py
+++ b/fatcat_scholar/grobid2json.py
@@ -108,7 +108,7 @@ def biblio_info(elem):
if ref["publisher"] == "":
ref["publisher"] = None
date = elem.find('.//{%s}date[@type="published"]' % ns)
- ref["date"] = (date != None) and date.attrib.get("when")
+ ref["date"] = (date is not None) and date.attrib.get("when")
ref["volume"] = elem.findtext('.//{%s}biblScope[@unit="volume"]' % ns)
ref["issue"] = elem.findtext('.//{%s}biblScope[@unit="issue"]' % ns)
el = elem.find(".//{%s}ptr[@target]" % ns)
@@ -148,7 +148,7 @@ def teixml2json(content, encumbered=True):
)
info["journal"] = journal_info(header)
date = header.find('.//{%s}date[@type="published"]' % ns)
- info["date"] = (date != None) and date.attrib.get("when")
+ info["date"] = (date is not None) and date.attrib.get("when")
info["fatcat_release"] = header.findtext('.//{%s}idno[@type="fatcat"]' % ns)
info["doi"] = header.findtext('.//{%s}idno[@type="DOI"]' % ns)
if info["doi"]: