From c8c8ec97a9100e626886641008d4d0909704bc8a Mon Sep 17 00:00:00 2001 From: Tom Herman Date: Tue, 12 Dec 2023 12:39:00 +0200 Subject: [PATCH] run mypy & bandit also on tests --- pyproject.toml | 2 +- tests/conftest.py | 6 ++++-- tox.ini | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4e4b23f..4a7785a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ fj = 'flipjump.flipjump_cli:main' [tool.mypy] -files = "flipjump" +files = ["flipjump", "tests"] strict = true disable_error_code = ["import-untyped"] diff --git a/tests/conftest.py b/tests/conftest.py index 8035628..5dfa01d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -289,8 +289,10 @@ def filter_by_test_name( return tests_args return [ - args for args in tests_args if is_test_name_ok(args.values[0].test_name, exact, contains, startswith, endswith) - ] # type: ignore[union-attr] + args + for args in tests_args + if is_test_name_ok(args.values[0].test_name, exact, contains, startswith, endswith) # type: ignore[union-attr] + ] def pytest_generate_tests(metafunc: Metafunc) -> None: diff --git a/tox.ini b/tox.ini index f457402..28d2447 100644 --- a/tox.ini +++ b/tox.ini @@ -62,5 +62,5 @@ per-file-ignores = [bandit] recursive = true -targets = flipjump, tests +targets = flipjump,tests skips = B101