1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 03:12:34 +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

@@ -31,6 +31,7 @@ from wlauto.exceptions import ConfigError, InstrumentError, DeviceError
from wlauto.utils.misc import ensure_directory_exists as _d
from wlauto.utils.types import list_of_ints, list_of_strs, boolean
# pylint: disable=wrong-import-position,wrong-import-order
daqpower_path = os.path.join(os.path.dirname(__file__), '..', '..', 'external', 'daq_server', 'src')
sys.path.insert(0, daqpower_path)
try:
@@ -283,7 +284,7 @@ class Daq(Instrument):
self._results = None
self._metrics = set()
if self.labels:
if not (len(self.labels) == len(self.resistor_values)): # pylint: disable=superfluous-parens
if len(self.labels) != len(self.resistor_values):
raise ConfigError('Number of DAQ port labels does not match the number of resistor values.')
else:
self.labels = ['PORT_{}'.format(i) for i, _ in enumerate(self.resistor_values)]
@@ -319,7 +320,7 @@ class Daq(Instrument):
for name in old_names:
if name not in self.labels:
raise ConfigError("No channel with label {} specified".format(name))
self.label_map = self.merge_channels
self.label_map = self.merge_channels # pylint: disable=redefined-variable-type
self.merge_channels = True
else: # Should never reach here
raise AssertionError("Merge files is of invalid type")

View File

@@ -820,7 +820,7 @@ def _adjust_for_thermal(data, filt_method=lambda x: x, thresh=0.9, window=5000,
if __name__ == '__main__':
import sys
import sys # pylint: disable=wrong-import-position,wrong-import-order
indir, outdir = sys.argv[1], sys.argv[2]
device_name = 'odroidxu3'
big_core = 'a15'

View File

@@ -27,6 +27,10 @@ import tempfile
from distutils.version import LooseVersion
try:
import pandas as pd
except ImportError:
pd = None
from wlauto import Instrument, Parameter, IterationResult
from wlauto.instrumentation import instrument_is_installed
@@ -34,11 +38,6 @@ from wlauto.exceptions import (InstrumentError, WorkerThreadError, ConfigError,
DeviceNotRespondingError, TimeoutError)
from wlauto.utils.types import boolean, numeric
try:
import pandas as pd
except ImportError:
pd = None
VSYNC_INTERVAL = 16666667
PAUSE_LATENCY = 20

View File

@@ -148,7 +148,7 @@ class PerfInstrument(Instrument):
self.events = [self.events]
if not self.labels: # pylint: disable=E0203
self.labels = ['perf_{}'.format(i) for i in xrange(len(self.optionstrings))]
if not len(self.labels) == len(self.optionstrings):
if len(self.labels) != len(self.optionstrings):
raise ConfigError('The number of labels must match the number of optstrings provided for perf.')
def _build_commands(self):
@@ -173,4 +173,3 @@ class PerfInstrument(Instrument):
event_string,
self._get_device_outfile(label))
return command

View File

@@ -146,7 +146,7 @@ class CciPmuLogger(Instrument):
raise ConfigError('To use cci_pmu_logger, trace-cmd instrument must also be enabled.')
if not self.event_labels: # pylint: disable=E0203
self.event_labels = ['event_{}'.format(e) for e in self.events]
elif not len(self.events) == len(self.event_labels):
elif len(self.events) != len(self.event_labels):
raise ConfigError('cci_pmu_events and cci_pmu_event_labels must be of the same length.')
if len(self.events) > NUMBER_OF_CCI_PMU_COUNTERS:
raise ConfigError('The number cci_pmu_counters must be at most {}'.format(NUMBER_OF_CCI_PMU_COUNTERS))