pre-commit: Integrate bandit

Run bandit check from per-commit so that the check is executed in pep8
job.

Also remove requirements installed automatically by pre-commit from
test-requirements.

Change-Id: I45af8c47afb262882ebbee74ae52446fed741e26
This commit is contained in:
Takashi Kajinami
2025-02-09 08:03:34 +09:00
parent 5f6fbaea56
commit dd0082c343
7 changed files with 14 additions and 10 deletions

View File

@@ -139,7 +139,7 @@ class DataSourceManager(object):
ds.METRIC_MAP.update(self.metric_map[ds.NAME])
return ds
except Exception:
pass
pass # nosec: B110
raise exception.MetricNotAvailable(metric=metric)
def load_metric_map(self, file_path):

View File

@@ -19,7 +19,7 @@
import abc
import collections
from lxml import etree
from lxml import etree # nosec: B410
from oslo_log import log
from watcher.objects import base

View File

@@ -17,7 +17,7 @@ Openstack implementation of the cluster graph.
"""
import ast
from lxml import etree
from lxml import etree # nosec: B410
import networkx as nx
from oslo_concurrency import lockutils
from oslo_log import log