I'm trying to use pyproject.toml
to exclude the venv/
directory. But it is not recognising the option.
[tool.bandit]
exclude = "/venv"
[tool.black]
exclude = "(venv)"
[tool.isort]
profile = "black"
skip = "venv"
balanced_wrapping = true
atomic = true
If I use the CLI option like so:
$ bandit -v -r . --exclude "/venv"
the directory is excluded. But if I just run bandit, it doesn't exclude the directory even though I have it in the pyproject.toml
.
My bandit version is: 1.7.1.
toml
module or usebandit[toml]
to pull in the optional dependency. github.com/PyCQA/bandit/issues/318 touches on the need for an explicit-c
argument. – Sievers