Cleaning code

This patch cleans up a bunch of little things in the code and
reworks the test set, old profile functionality is preserved.

Change-Id: Ieab21e6863cd3c60023a7c5f686b90afda1fc95d
This commit is contained in:
Tim Kelsey
2016-01-21 14:59:26 +00:00
parent 7f9524e63e
commit ae1cff7fae
8 changed files with 46 additions and 191 deletions

View File

@@ -72,8 +72,7 @@ class BanditManager():
else:
profile = None
self.b_ts = b_test_set.BanditTestSet(config=self.b_conf,
profile=profile)
self.b_ts = b_test_set.BanditTestSet(config, profile)
# set the increment of after how many files to show progress
self.progress = b_constants.progress_increment
@@ -92,10 +91,6 @@ class BanditManager():
conf_level=b_constants.LOW):
return self.filter_results(sev_level, conf_level)
@property
def has_tests(self):
return self.b_ts.has_tests
def populate_baseline(self, data):
'''Populate a baseline set of issues from a JSON report
@@ -290,7 +285,7 @@ class BanditManager():
:return: The accumulated test score
'''
score = []
res = b_node_visitor.BanditNodeVisitor(fname, self.b_conf, self.b_ma,
res = b_node_visitor.BanditNodeVisitor(fname, self.b_ma,
self.b_ts, self.debug,
nosec_lines, self.metrics)