From 19c1404c4aaaa7cc8eeafda585cfa8af77d11fd6 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 23 Apr 2021 11:01:43 -0700 Subject: make fmt --- chocula/directories/doaj.py | 4 +--- chocula/directories/issn_meta.py | 4 +++- chocula/directories/manual_homepages.py | 8 ++++++-- chocula/directories/vanished_disapeared.py | 4 +++- chocula/directories/vanished_inactive.py | 4 +++- 5 files changed, 16 insertions(+), 8 deletions(-) (limited to 'chocula/directories') diff --git a/chocula/directories/doaj.py b/chocula/directories/doaj.py index f9531b1..6caa9f6 100644 --- a/chocula/directories/doaj.py +++ b/chocula/directories/doaj.py @@ -96,9 +96,7 @@ class DoajLoader(DirectoryLoader): if row["Preservation Services"]: info.extra["archive"] = [ - a.strip() - for a in row["Preservation Services"].split(",") - if a.strip() + a.strip() for a in row["Preservation Services"].split(",") if a.strip() ] elif row["Preservation Service: national library"]: info.extra["archive"] = ["national-library"] diff --git a/chocula/directories/issn_meta.py b/chocula/directories/issn_meta.py index 4416125..472fda8 100644 --- a/chocula/directories/issn_meta.py +++ b/chocula/directories/issn_meta.py @@ -29,7 +29,9 @@ class IssnMetaLoader(DirectoryLoader): row = json.loads(row) - info = DirectoryInfo(directory_slug=self.source_slug,) + info = DirectoryInfo( + directory_slug=self.source_slug, + ) # format is an array of metadata elements for el in row: if "label" in el and el["@id"].startswith( diff --git a/chocula/directories/manual_homepages.py b/chocula/directories/manual_homepages.py index 3f84794..4b058b3 100644 --- a/chocula/directories/manual_homepages.py +++ b/chocula/directories/manual_homepages.py @@ -11,7 +11,8 @@ class ManualHomepageLoader(DirectoryLoader): def open_file(self) -> Iterable: return csv.DictReader( - open(self.config.manual_homepages.filepath), delimiter="\t", + open(self.config.manual_homepages.filepath), + delimiter="\t", ) def parse_record(self, record) -> Optional[DirectoryInfo]: @@ -35,7 +36,10 @@ class ManualHomepageLoader(DirectoryLoader): - Inactive """ - info = DirectoryInfo(directory_slug=self.source_slug, issnl=record["issnl"],) + info = DirectoryInfo( + directory_slug=self.source_slug, + issnl=record["issnl"], + ) url = record["Homepage URL"] if url is None or url.lower() == "unknown" or len(url) < 4: return None diff --git a/chocula/directories/vanished_disapeared.py b/chocula/directories/vanished_disapeared.py index de25434..36bd66b 100644 --- a/chocula/directories/vanished_disapeared.py +++ b/chocula/directories/vanished_disapeared.py @@ -35,7 +35,9 @@ class VanishedDisapearedLoader(DirectoryLoader): source_slug = "vanished_disapeared" def open_file(self) -> Iterable: - return csv.DictReader(open(self.config.vanished_disapeared.filepath), delimiter=";") + return csv.DictReader( + open(self.config.vanished_disapeared.filepath), delimiter=";" + ) def parse_record(self, record) -> Optional[DirectoryInfo]: diff --git a/chocula/directories/vanished_inactive.py b/chocula/directories/vanished_inactive.py index 61d6077..3baa079 100644 --- a/chocula/directories/vanished_inactive.py +++ b/chocula/directories/vanished_inactive.py @@ -22,7 +22,9 @@ class VanishedInactiveLoader(DirectoryLoader): source_slug = "vanished_inactive" def open_file(self) -> Iterable: - return csv.DictReader(open(self.config.vanished_inactive.filepath), delimiter=";") + return csv.DictReader( + open(self.config.vanished_inactive.filepath), delimiter=";" + ) def parse_record(self, record) -> Optional[DirectoryInfo]: -- cgit v1.2.3