diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-06-03 23:16:07 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-03 23:16:07 -0700 |
commit | 62fde540ef9c38d403ea89a6fb1db51bfba23da8 (patch) | |
tree | 2142c739349237b0ef137a57000850db1b2ff39d /fatcat_scholar/grobid2json.py | |
parent | 74ef1c6f4e0f08dd6a6b3e6eacc4d780c990eb3f (diff) | |
download | fatcat-scholar-62fde540ef9c38d403ea89a6fb1db51bfba23da8.tar.gz fatcat-scholar-62fde540ef9c38d403ea89a6fb1db51bfba23da8.zip |
flake8 fixes (partial)
Diffstat (limited to 'fatcat_scholar/grobid2json.py')
-rwxr-xr-x | fatcat_scholar/grobid2json.py | 4 |
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"]: |