aboutsummaryrefslogtreecommitdiffstats
path: root/chocula/directories
diff options
context:
space:
mode:
Diffstat (limited to 'chocula/directories')
-rw-r--r--chocula/directories/doaj.py4
-rw-r--r--chocula/directories/sim.py8
2 files changed, 8 insertions, 4 deletions
diff --git a/chocula/directories/doaj.py b/chocula/directories/doaj.py
index a62a974..e9c94c9 100644
--- a/chocula/directories/doaj.py
+++ b/chocula/directories/doaj.py
@@ -117,7 +117,9 @@ class DoajLoader(DirectoryLoader):
info.extra["crawl_permission"] = dict(Yes=True, No=False)[crawl_permission]
default_license = row["Journal license"]
if default_license and default_license.startswith("CC"):
- info.extra["default_license"] = default_license.replace("CC ", "CC-").strip()
+ info.extra["default_license"] = default_license.replace(
+ "CC ", "CC-"
+ ).strip()
url = row["Journal URL"]
if url:
diff --git a/chocula/directories/sim.py b/chocula/directories/sim.py
index 1eb29be..e51afa3 100644
--- a/chocula/directories/sim.py
+++ b/chocula/directories/sim.py
@@ -13,9 +13,9 @@ from chocula.database import DirectoryInfo
def truthy(raw: Optional[str]) -> Optional[bool]:
if not raw:
return None
- if raw.lower() == 'y':
+ if raw.lower() == "y":
return True
- if raw.lower() == 'n':
+ if raw.lower() == "n":
return False
return None
@@ -67,7 +67,9 @@ class SimLoader(DirectoryLoader):
extra["gaps"] = gaps
if first_year and last_year:
extra["year_spans"] = gaps_to_spans(first_year, last_year, gaps)
- extra["scholarly_peer_reviewed"] = truthy(clean_str(row["Scholarly / Peer-\nReviewed"]))
+ extra["scholarly_peer_reviewed"] = truthy(
+ clean_str(row["Scholarly / Peer-\nReviewed"])
+ )
extra["peer_reviewed"] = truthy(clean_str(row["Peer-\nReviewed"]))
extra["pub_type"] = clean_str(row["Pub Type"])