diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-01-25 22:46:06 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-01-25 22:46:06 -0800 |
commit | eeac3b091cfa9937e7222253c650e21d0865eb79 (patch) | |
tree | 2f5aa4baaae8ce29812fc23e5ee071533b7c28b7 /fatcat_scholar | |
parent | b9ad86071622b0e12cc5ff7fccc4e094785891fb (diff) | |
download | fatcat-scholar-eeac3b091cfa9937e7222253c650e21d0865eb79.tar.gz fatcat-scholar-eeac3b091cfa9937e7222253c650e21d0865eb79.zip |
make fmt
Diffstat (limited to 'fatcat_scholar')
-rw-r--r-- | fatcat_scholar/query_citation.py | 4 | ||||
-rw-r--r-- | fatcat_scholar/query_fatcat.py | 4 | ||||
-rw-r--r-- | fatcat_scholar/schema.py | 4 | ||||
-rw-r--r-- | fatcat_scholar/transform.py | 5 |
4 files changed, 13 insertions, 4 deletions
diff --git a/fatcat_scholar/query_citation.py b/fatcat_scholar/query_citation.py index 21f4a9c..4f40c73 100644 --- a/fatcat_scholar/query_citation.py +++ b/fatcat_scholar/query_citation.py @@ -188,7 +188,9 @@ if __name__ == "__main__": release = ref_to_release(ref) print(release) - es_backend = os.environ.get("ELASTICSEARCH_FATCAT_BASE", "https://search.fatcat.wiki") + es_backend = os.environ.get( + "ELASTICSEARCH_FATCAT_BASE", "https://search.fatcat.wiki" + ) es_client = elasticsearch.Elasticsearch(es_backend) api_conf = fatcat_openapi_client.Configuration() api_conf.host = os.environ.get("FATCAT_API_HOST", "https://api.fatcat.wiki/v0") diff --git a/fatcat_scholar/query_fatcat.py b/fatcat_scholar/query_fatcat.py index 0f5347b..24bd662 100644 --- a/fatcat_scholar/query_fatcat.py +++ b/fatcat_scholar/query_fatcat.py @@ -44,7 +44,9 @@ def run_query_fatcat(query: str, fulltext_only: bool, json_output: Any) -> None: """ api_session = requests_retry_session() - es_backend = os.environ.get("ELASTICSEARCH_FATCAT_BASE", "https://search.fatcat.wiki") + es_backend = os.environ.get( + "ELASTICSEARCH_FATCAT_BASE", "https://search.fatcat.wiki" + ) es_index = os.environ.get("ELASTICSEARCH_FATCAT_RELEASE_INDEX", "fatcat_release") es_client = elasticsearch.Elasticsearch(es_backend) diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py index 9377048..0f02f1e 100644 --- a/fatcat_scholar/schema.py +++ b/fatcat_scholar/schema.py @@ -500,7 +500,9 @@ def es_biblio_from_release(release: ReleaseEntity) -> ScholarBiblio: if release.container.extra: publisher_type = release.container.extra.get("publisher_type") container_original_name = release.container.extra.get("original_name") - container_sherpa_color = release.container.extra.get("sherpa_romeo", {}).get("color") + container_sherpa_color = release.container.extra.get( + "sherpa_romeo", {} + ).get("color") if release.container.extra.get("issne"): issns.append(release.container.extra["issne"]) if release.container.extra.get("issnp"): diff --git a/fatcat_scholar/transform.py b/fatcat_scholar/transform.py index 539f76f..e50c411 100644 --- a/fatcat_scholar/transform.py +++ b/fatcat_scholar/transform.py @@ -401,7 +401,10 @@ def check_exclude_web(biblio: ScholarBiblio) -> bool: """ if biblio.release_year and biblio.release_year <= 1925: return False - if biblio.container_ident and biblio.container_ident in settings.EXCLUDE_WEB_CONTAINER_IDENTS: + if ( + biblio.container_ident + and biblio.container_ident in settings.EXCLUDE_WEB_CONTAINER_IDENTS + ): return True if biblio.publisher: for pub in settings.EXCLUDE_WEB_PUBLISHERS: |