From a2b7865dda48eb9e6abdbc718bea628cf8ea1bd4 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 2 Oct 2025 23:57:02 +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: I1df4789cdd136012fd7ae870c6e26fde9e3c7c3c 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 0380955f..33ccf155 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', 'B303'] + args: ['-c', 'pyproject.toml'] - repo: https://github.com/asottile/pyupgrade rev: v3.20.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 28030df5..298eacc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,3 +37,7 @@ Repository = "https://opendev.org/openstack/oslo.versionedobjects" packages = [ "oslo_versionedobjects" ] + +[tool.bandit] +exclude_dirs = ["tests"] +skips = ['B303']