1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-01 19:02:31 +01:00

Updated pylint for v1.5.1

Fixed WA for the latest version of pylint (1.5.1)
This commit is contained in:
Sebastian Goscik
2015-12-09 15:43:35 +00:00
parent 344bc519c4
commit bef8fb40ef
35 changed files with 86 additions and 102 deletions

View File

@@ -79,7 +79,7 @@ class Antutu(AndroidUiAutoBenchmark):
if self.version == '4.0.3':
metrics = extract_version4_metrics(fh)
else:
metrics = extract_older_version_metrics(fh)
metrics = extract_older_version_metrics(fh) # pylint: disable=redefined-variable-type
for key, value in metrics.iteritems():
key = key.replace(' ', '_')
context.result.add_metric(key, value)
@@ -118,7 +118,7 @@ def extract_older_version_metrics(fh):
for line in fh:
if 'i/antutu' in line.lower():
parts = line.split(':')
if not len(parts) == 3:
if len(parts) != 3:
continue
metric = parts[1].strip()
value = int(parts[2].strip())
@@ -132,4 +132,3 @@ def extract_older_version_metrics(fh):
metrics[metric] = value
return metrics

View File

@@ -14,11 +14,11 @@
# pylint: disable=W0201, C0103
from wlauto import Workload, Parameter, Executable
import os
import re
from wlauto import Workload, Parameter, Executable
results_txt = 'ebizzy_results.txt'
record_regex = re.compile(r'(?P<record>\d+) records/s')
result_regex = re.compile(r'(?P<metric>\D+)(?P<value>\d+.*\b)(?P<unit>\S+)')

View File

@@ -14,11 +14,12 @@
# pylint: disable=W0201, C0103
from wlauto import Workload, Parameter, Executable
import os
import re
from wlauto import Workload, Parameter, Executable
hackbench_results_txt = 'hackbench_results.txt'
regex_map = {"total_groups": (re.compile(r'(\d+) groups'), "groups"),

View File

@@ -44,7 +44,7 @@ class IdleWorkload(Workload):
def setup(self, context):
if self.stop_android:
if not self.device.platform == 'android':
if self.device.platform != 'android':
raise ConfigError('stop_android can only be set for Android devices')
if not self.device.is_rooted:
raise WorkloadError('Idle workload requires the device to be rooted in order to stop Android.')
@@ -66,4 +66,3 @@ class IdleWorkload(Workload):
time.sleep(0.2)
while self.device.execute('getprop init.svc.bootanim').strip() == 'running':
time.sleep(1)

View File

@@ -12,16 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# pylint: disable=attribute-defined-outside-init
from wlauto import Workload, Parameter, Executable
from wlauto.exceptions import ConfigError
from wlauto.utils.types import list_of_ints
from collections import OrderedDict
from itertools import izip_longest
import os
import re
import csv
from wlauto import Workload, Parameter, Executable
from wlauto.exceptions import ConfigError
from wlauto.utils.types import list_of_ints
iozone_results_txt = 'iozone_results.txt'

View File

@@ -119,10 +119,7 @@ class Spec2000(Workload):
# (also more than just summary/non-summary classification?)
class _SPECSummaryMetrics(object):
def __contains__(self, item):
if item.endswith('_real'):
return True
else:
return False
return item.endswith('_real')
asset_file = 'spec2000-assets.tar.gz'
@@ -351,4 +348,3 @@ class CommandSpec(object):
self.datadir = None
self.command = None
self.threads = None

View File

@@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# pylint: disable=attribute-defined-outside-init
import os
import re
from wlauto import Workload, Parameter, Executable
import os
import re
stream_results_txt = 'stream_results.txt'
system_array_regex = re.compile(r'^This system uses (\d)')

View File

@@ -300,8 +300,7 @@ def parse_telemetry_results(filepath):
if __name__ == '__main__':
import sys
from pprint import pprint
import sys # pylint: disable=wrong-import-order,wrong-import-position
from pprint import pprint # pylint: disable=wrong-import-order,wrong-import-position
path = sys.argv[1]
pprint(parse_telemetry_results(path))