summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-07-23 11:57:13 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-07-23 11:57:47 -0700
commit26a1763125a25e49903d667a048820213d90ed5b (patch)
tree1ddc2dd8e1c5dd4d69d59a26f41078c2c8d11096 /python
parent7489ef7a979574effa74f1f17cebb81eefb1b71a (diff)
downloadfatcat-26a1763125a25e49903d667a048820213d90ed5b.tar.gz
fatcat-26a1763125a25e49903d667a048820213d90ed5b.zip
pylint: skip pydantic import check (dynamic/extensions)
Diffstat (limited to 'python')
-rw-r--r--python/.pylintrc2
-rw-r--r--python/fatcat_tools/references.py10
2 files changed, 4 insertions, 8 deletions
diff --git a/python/.pylintrc b/python/.pylintrc
index d3003620..5fc310a8 100644
--- a/python/.pylintrc
+++ b/python/.pylintrc
@@ -14,3 +14,5 @@ notes=FIXME,XXX,DELETEME
ignored-modules=responses
# FileEntityForm' has no 'data' member (no-member) (etc)
generated-members=data,errors
+# No name 'BaseModel' in module 'pydantic' (no-name-in-module) (etc)
+extension-pkg-allow-list=pydantic
diff --git a/python/fatcat_tools/references.py b/python/fatcat_tools/references.py
index a0079efd..da398239 100644
--- a/python/fatcat_tools/references.py
+++ b/python/fatcat_tools/references.py
@@ -192,9 +192,6 @@ def get_inbound_refs(
es_index: str = "fatcat_ref",
) -> List[BiblioRef]:
- if url and not url_surt:
- url = surt_ify(url)
-
search = Search(using=es_client, index=es_index)
if consolidate_works:
@@ -243,9 +240,6 @@ def count_inbound_refs(
Same parameters as get_inbound_refs(), but returns just a count
"""
- if url and not url_surt:
- url = surt_ify(url)
-
search = Search(using=es_client, index=es_index)
if release_ident:
@@ -324,7 +318,7 @@ def run_ref_query(args) -> None:
print(f"Total: {hits.count_total} Time: {hits.query_wall_time_ms}ms; {hits.query_time_ms}ms")
if args.enrich == "fatcat":
- enriched = enrich_outbound_refs_fatcat(hits.result_refs, hide='refs,abstracts', fatcat_api_client=args.fatcat_api_client)
+ enriched = enrich_outbound_refs(hits.result_refs, hide='refs,abstracts', fatcat_api_client=args.fatcat_api_client)
for ref in enriched:
if ref.release:
print(f"{ref.ref.ref_index or '-'}\trelease_{ref.release.ident}\t{ref.ref.match_provenance}/{ref.ref.match_status}\t{ref.release.release_year or '-'}\t{ref.release.title}\t{ref.release.ext_ids.pmid or ref.release.ext_ids.doi or '-'}")
@@ -341,7 +335,7 @@ def run_ref_query(args) -> None:
print(f"Total: {hits.count_total} Time: {hits.query_wall_time_ms}ms; {hits.query_time_ms}ms")
if args.enrich == "fatcat":
- enriched = enrich_inbound_refs_fatcat(hits.result_refs, hide='refs,abstracts', fatcat_api_client=args.fatcat_api_client)
+ enriched = enrich_inbound_refs(hits.result_refs, hide='refs,abstracts', fatcat_api_client=args.fatcat_api_client)
for ref in enriched:
if ref.release:
print(f"release_{ref.release.ident}\t{ref.ref.match_provenance}/{ref.ref.match_status}\t{ref.release.release_year or '-'}\t{ref.release.title}\t{ref.release.ext_ids.pmid or ref.release.ext_ids.doi or '-'}")