From 08d0cec7391708b15db2b581cf707a39fb1308d9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 10 Nov 2021 16:52:23 -0800 Subject: lint: disallow 'import *' even in tests --- .flake8 | 2 +- tests/test_transform.py | 14 +++++++++++--- tests/test_work_pipeline.py | 4 +++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.flake8 b/.flake8 index 96345cd..62947b1 100644 --- a/.flake8 +++ b/.flake8 @@ -9,7 +9,7 @@ select = C,E,F,W,ANN ignore = ANN003,ANN101,ANN204,E265,E266,E501,W503,E203 per-file-ignores = fatcat_scholar/__init__.py: F401 - tests/*.py: ANN201,ANN001,F403,F405 + tests/*.py: ANN201,ANN001 exclude = .git,__pycache__,.venv max-line-length = 88 max-complexity = 30 diff --git a/tests/test_transform.py b/tests/test_transform.py index 4409bf0..fd14533 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -1,8 +1,16 @@ +import json + from fatcat_openapi_client import ReleaseEntity -from fatcat_scholar.api_entities import * -from fatcat_scholar.schema import * -from fatcat_scholar.transform import * +from fatcat_scholar.api_entities import entity_from_json +from fatcat_scholar.schema import ScholarBiblio +from fatcat_scholar.transform import ( + biblio_metadata_hacks, + es_biblio_from_release, + es_release_from_release, + run_refs, + run_transform, +) def test_es_release_from_release() -> None: diff --git a/tests/test_work_pipeline.py b/tests/test_work_pipeline.py index 554cc07..bc8a79a 100644 --- a/tests/test_work_pipeline.py +++ b/tests/test_work_pipeline.py @@ -1,3 +1,5 @@ +from typing import Any + import responses from fatcat_scholar.config import settings @@ -6,7 +8,7 @@ from fatcat_scholar.sandcrawler import ( SandcrawlerMinioClient, SandcrawlerPostgrestClient, ) -from fatcat_scholar.work_pipeline import * +from fatcat_scholar.work_pipeline import WorkPipeline @responses.activate -- cgit v1.2.3