diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-03 12:29:39 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-03 12:31:07 -0700 |
commit | 10a2374051568edf3d872988e730328d899a0fdd (patch) | |
tree | 795be5e149a021f84bc4305c1811e63cc86f7aa1 /python/tests | |
parent | cfab1ddcd8a05b62ecc16763d18a6ecee8fa234f (diff) | |
download | fatcat-10a2374051568edf3d872988e730328d899a0fdd.tar.gz fatcat-10a2374051568edf3d872988e730328d899a0fdd.zip |
typing: first batch of python bulk type annotations
While these changes are more delicate than simple lint changes, this
specific batch of edits and annotations was *relatively* simple, and
resulted in few code changes other than function signature additions.
Diffstat (limited to 'python/tests')
-rw-r--r-- | python/tests/import_common.py | 2 | ||||
-rw-r--r-- | python/tests/transform_csl.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/python/tests/import_common.py b/python/tests/import_common.py index cd89f914..6e66c295 100644 --- a/python/tests/import_common.py +++ b/python/tests/import_common.py @@ -6,7 +6,7 @@ import elasticsearch import fatcat_openapi_client import fuzzycat.matching import pytest -from fatcat_openapi_client import ReleaseEntity, ReleaseExtIds +from fatcat_openapi_client import ReleaseContrib, ReleaseEntity, ReleaseExtIds from fixtures import * from fatcat_tools.importers import EntityImporter diff --git a/python/tests/transform_csl.py b/python/tests/transform_csl.py index 2bf584ba..2b6fab31 100644 --- a/python/tests/transform_csl.py +++ b/python/tests/transform_csl.py @@ -1,4 +1,5 @@ import json +from typing import Any import pytest from fatcat_openapi_client import ReleaseEntity @@ -8,7 +9,7 @@ from import_crossref import crossref_importer from fatcat_tools.transforms import citeproc_csl, entity_from_json, release_to_csl -def test_csl_crossref(crossref_importer): +def test_csl_crossref(crossref_importer: Any) -> None: with open("tests/files/crossref-works.single.json", "r") as f: # not a single line raw = json.loads(f.read()) @@ -30,7 +31,7 @@ def test_csl_crossref(crossref_importer): citeproc_csl(csl, "csl-json") -def test_csl_pubmed(crossref_importer): +def test_csl_pubmed(crossref_importer: Any) -> None: with open("tests/files/example_releases_pubmed19n0972.json", "r") as f: # multiple single lines for line in f: @@ -42,7 +43,7 @@ def test_csl_pubmed(crossref_importer): citeproc_csl(csl, "harvard1", html=True) -def test_csl_pubmed_bibtex(crossref_importer): +def test_csl_pubmed_bibtex(crossref_importer: Any) -> None: with open("tests/files/example_releases_pubmed19n0972.json", "r") as f: r = entity_from_json(f.readline(), ReleaseEntity) csl = release_to_csl(r) |