pylint: Enable and fix no-self-use warnings

This commit is contained in:
Kamil Śliwak 2021-12-21 15:23:52 +01:00
parent 449f56c15b
commit 784ae91b41
4 changed files with 6 additions and 4 deletions

View File

@ -154,7 +154,8 @@ class TraceAnalyser:
print(len(intersection), "test-cases - ", len(mismatches), " mismatche(s)")
def check_traces(self, test_name, left, right, mismatches):
@classmethod
def check_traces(cls, test_name, left, right, mismatches):
for trace_id, trace in enumerate(left.traces):
left_trace = trace
right_trace = right.traces[trace_id]

View File

@ -24,7 +24,6 @@ disable=
invalid-name,
missing-docstring,
no-else-return,
no-self-use,
pointless-string-statement,
redefined-builtin,
redefined-outer-name,

View File

@ -41,7 +41,8 @@ class regressor:
"build/test/tools/ossfuzz")
self._logpath = os.path.join(self._repo_root, "test_results")
def parseCmdLine(self, description, args):
@classmethod
def parseCmdLine(cls, description, args):
argParser = ArgumentParser(description)
argParser.add_argument('-o', '--out-dir', required=True, type=str,
help="""Directory where test results will be written""")

View File

@ -39,6 +39,7 @@ class Rule:
self.error('Rule is incorrect.\nModel: ' + str(m))
self.solver.pop()
def error(self, msg):
@classmethod
def error(cls, msg):
print(msg)
sys.exit(1)