Merge "Fix for pylint no-self-use error"
This commit is contained in:
@@ -171,7 +171,8 @@ class BanditConfig():
|
||||
'data plugins')
|
||||
return bad_calls_list, bad_imports_list
|
||||
|
||||
def convert_legacy_blacklist_tests(self, profiles, bad_imports, bad_calls):
|
||||
@staticmethod
|
||||
def convert_legacy_blacklist_tests(profiles, bad_imports, bad_calls):
|
||||
'''Detect old blacklist tests, convert to use new builtin.'''
|
||||
def _clean_set(name, data):
|
||||
if name in data:
|
||||
|
||||
@@ -81,7 +81,8 @@ class Metrics(object):
|
||||
c.update(self.data[fname])
|
||||
self.data['_totals'] = dict(c)
|
||||
|
||||
def _get_issue_counts(self, scores):
|
||||
@staticmethod
|
||||
def _get_issue_counts(scores):
|
||||
"""Get issue counts aggregated by confidence/severity rankings.
|
||||
|
||||
:param scores: list of scores to aggregate / count
|
||||
|
||||
@@ -38,7 +38,8 @@ class BanditTestSet():
|
||||
self.plugins.extend(self._load_builtins(filtering, profile))
|
||||
self._load_tests(config, self.plugins)
|
||||
|
||||
def _get_filter(self, config, profile):
|
||||
@staticmethod
|
||||
def _get_filter(config, profile):
|
||||
extman = extension_loader.MANAGER
|
||||
|
||||
inc = set(profile.get('include', []))
|
||||
|
||||
@@ -92,7 +92,8 @@ class BanditTester():
|
||||
LOG.debug("Returning scores: %s", scores)
|
||||
return scores
|
||||
|
||||
def report_error(self, test, context, error):
|
||||
@staticmethod
|
||||
def report_error(test, context, error):
|
||||
what = "Bandit internal error running: "
|
||||
what += "%s " % test
|
||||
what += "on file %s at line %i: " % (
|
||||
|
||||
7
pylintrc
7
pylintrc
@@ -13,8 +13,7 @@
|
||||
# C0103: invalid-name
|
||||
# C1001: old-style-class
|
||||
# E1101: no-member
|
||||
# R0201: no-self-use
|
||||
# R0204: redefined-variable-typ
|
||||
# R0204: redefined-variable-type
|
||||
# R0902: too-many-instance-attributes
|
||||
# R0911: too-many-return-statements
|
||||
# R0912: too-many-branches
|
||||
@@ -31,7 +30,7 @@
|
||||
# W0613: unused-argument
|
||||
# W0621: redefined-outer-name
|
||||
# W0703: broad-except
|
||||
disable=C0111,C0301,C0325,C1001,F0401,W0511,W0142,W0622,C0103,E1101,R0201,R0204,R0902,R0911,R0912,R0913,R0914,R0915,W0110,W0141,W0201,W0401,W0603,W0212,W0612,W0613,W0621,W0703
|
||||
disable=C0111,C0301,C0325,C1001,F0401,W0511,W0142,W0622,C0103,E1101,R0204,R0902,R0911,R0912,R0913,R0914,R0915,W0110,W0141,W0201,W0401,W0603,W0212,W0612,W0613,W0621,W0703
|
||||
|
||||
[Basic]
|
||||
# Variable names can be 1 to 31 characters long, with lowercase and underscores
|
||||
@@ -73,4 +72,4 @@ ignore-comments=yes
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Ignore imports when computing similarities.
|
||||
ignore-imports=yes
|
||||
ignore-imports=yes
|
||||
|
||||
Reference in New Issue
Block a user