1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-10-30 14:44:09 +00:00

I lint, therefore I am

Implement fixes for the most recent pylint version.
This commit is contained in:
Sergei Trofimov
2018-07-09 15:28:22 +01:00
committed by Marc Bonnici
parent 0e0d4e0ff0
commit c410d2e1a1
22 changed files with 53 additions and 51 deletions

View File

@@ -55,7 +55,7 @@ class Antutu(ApkUiautoWorkload):
try:
result = float(match.group(1))
except ValueError:
result = 'NaN' # pylint: disable=redefined-variable-type
result = float('NaN')
entry = regex.pattern.rsplit(None, 1)[0]
context.add_metric(entry, result, lower_is_better=False)
expected_results -= 1

View File

@@ -150,10 +150,10 @@ class ExoPlayer(ApkWorkload):
return filepath
else:
if len(files) > 1:
self.logger.warn('Multiple files found for {} format. Using {}.'
.format(self.format, files[0]))
self.logger.warn('Use "filename"parameter instead of '
'"format" to specify a different file.')
self.logger.warning('Multiple files found for {} format. Using {}.'
.format(self.format, files[0]))
self.logger.warning('Use "filename"parameter instead of '
'"format" to specify a different file.')
return files[0]
def init_resources(self, context): # pylint: disable=unused-argument

View File

@@ -193,9 +193,9 @@ class VellamoResultParser(HTMLParser):
self.failed = False
self.benchmarks = []
def feed(self, text):
def feed(self, data):
try:
HTMLParser.feed(self, text)
HTMLParser.feed(self, data)
except self.StopParsingException:
pass
@@ -230,3 +230,6 @@ class VellamoResultParser(HTMLParser):
self.benchmarks[-1].add_metric(data)
else:
self.failed = True
def error(self, message):
raise WorkloadError('Error parsing raw output: {}'.format(message))