From 06858e3272695abacbf4fc68689d524085684255 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 2 Oct 2025 23:59:58 +0900 Subject: [PATCH] Migrate bandit options to pyproject.toml ... so that these options can be used by different tools than tox/pre-commit more easily. Change-Id: I1f4b291c986537d83e61d58bd22cbc42ce758ecd Signed-off-by: Takashi Kajinami --- .pre-commit-config.yaml | 2 +- pyproject.toml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 796d518..33ccf15 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: rev: 1.8.6 hooks: - id: bandit - args: ['-x', 'tests'] + args: ['-c', 'pyproject.toml'] - repo: https://github.com/asottile/pyupgrade rev: v3.20.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 504663b..d0207fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,3 +45,6 @@ e2 = "stevedore.tests.notfound:UnimportableExtension" packages = [ "stevedore" ] + +[tool.bandit] +exclude_dirs = ["tests"]