diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-06-22 13:46:42 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-22 13:46:42 -0700 |
commit | db40b9e70b917dbbbfda48f6d77a2fc509366a82 (patch) | |
tree | e66626601ec32965c4cee7fad16982530408019b /chocula/directories/entrez.py | |
parent | 5d3ce061d24a5188fc015012b2f70a4c6f568969 (diff) | |
download | chocula-db40b9e70b917dbbbfda48f6d77a2fc509366a82.tar.gz chocula-db40b9e70b917dbbbfda48f6d77a2fc509366a82.zip |
fmt (black)
Diffstat (limited to 'chocula/directories/entrez.py')
-rw-r--r-- | chocula/directories/entrez.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/chocula/directories/entrez.py b/chocula/directories/entrez.py index b30f04d..f9f6d23 100644 --- a/chocula/directories/entrez.py +++ b/chocula/directories/entrez.py @@ -1,4 +1,3 @@ - from typing import Iterable, Optional import csv @@ -26,14 +25,13 @@ class EntrezLoader(DirectoryLoader): return csv.DictReader(open(self.config.entrez_simple.filepath)) def parse_record(self, record) -> Optional[DirectoryInfo]: - if not (record.get('ISSN (Online)') or record.get('ISSN (Print)')): + if not (record.get("ISSN (Online)") or record.get("ISSN (Print)")): return None return DirectoryInfo( directory_slug=self.source_slug, - issne=record.get('ISSN (Online)'), - issnp=record.get('ISSN (Print)'), - custom_id=record.get('NlmId').strip() or None, - name=clean_str(record.get('JournalTitle')), - abbrev=clean_str(record['IsoAbbr']), + issne=record.get("ISSN (Online)"), + issnp=record.get("ISSN (Print)"), + custom_id=record.get("NlmId").strip() or None, + name=clean_str(record.get("JournalTitle")), + abbrev=clean_str(record["IsoAbbr"]), ) - |