Skip to content

Commit

Permalink
run mypy & bandit also on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhea committed Dec 12, 2023
1 parent 1ed3e7c commit c8c8ec9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fj = 'flipjump.flipjump_cli:main'


[tool.mypy]
files = "flipjump"
files = ["flipjump", "tests"]
strict = true
disable_error_code = ["import-untyped"]

Expand Down
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ per-file-ignores =

[bandit]
recursive = true
targets = flipjump, tests
targets = flipjump,tests
skips = B101

0 comments on commit c8c8ec9

Please sign in to comment.