From cefd59d8190c34ebf0a777054f0436aca0dee5aa Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 2 Oct 2025 23:50:16 +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: I84450593a75ccbc957b98595f672320bb897009c Signed-off-by: Takashi Kajinami --- .pre-commit-config.yaml | 2 +- pyproject.toml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 777d047..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', '--skip', 'B404,B603'] + args: ['-c', 'pyproject.toml'] - repo: https://github.com/asottile/pyupgrade rev: v3.20.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 2d5a72a..4e62dcf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,3 +39,7 @@ privsep-helper = "oslo_privsep.daemon:helper_main" [tool.setuptools] packages = ["oslo_privsep"] + +[tool.bandit] +exclude_dirs = ["tests"] +skips = ['B404', 'B603']