mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-30 14:44:09 +00:00
wa: pep8 fixes
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#
|
||||
|
||||
|
||||
#pylint: disable=W0613,E1101,E0203,W0201
|
||||
# pylint: disable=W0613,E1101,E0203,W0201
|
||||
import time
|
||||
|
||||
from wa import Instrument, Parameter
|
||||
|
||||
@@ -38,7 +38,7 @@ class DmesgInstrument(Instrument):
|
||||
|
||||
loglevel_file = '/proc/sys/kernel/printk'
|
||||
|
||||
def initialize(self, context): #pylint: disable=unused-argument
|
||||
def initialize(self, context): # pylint: disable=unused-argument
|
||||
self.need_root = self.target.os == 'android'
|
||||
if self.need_root and not self.target.is_rooted:
|
||||
raise InstrumentError('Need root to collect dmesg on Android')
|
||||
|
||||
@@ -60,7 +60,7 @@ class EnergyInstrumentBackend(Plugin):
|
||||
Typically there is just a single device/instrument, in which case the
|
||||
device key is arbitrary.
|
||||
"""
|
||||
return {None: self.instrument(target, **kwargs)} #pylint: disable=not-callable
|
||||
return {None: self.instrument(target, **kwargs)} # pylint: disable=not-callable
|
||||
|
||||
|
||||
class DAQBackend(EnergyInstrumentBackend):
|
||||
@@ -284,7 +284,7 @@ class AcmeCapeBackend(EnergyInstrumentBackend):
|
||||
"""),
|
||||
]
|
||||
|
||||
#pylint: disable=arguments-differ
|
||||
# pylint: disable=arguments-differ
|
||||
def get_instruments(self, target, metadir,
|
||||
iio_capture, host, iio_devices, buffer_size):
|
||||
|
||||
@@ -429,7 +429,7 @@ class EnergyMeasurement(Instrument):
|
||||
self.instruments = self.backend.get_instruments(self.target, context.run_output.metadir, **self.params)
|
||||
|
||||
for instrument in self.instruments.values():
|
||||
if not (instrument.mode & CONTINUOUS): #pylint: disable=superfluous-parens
|
||||
if not (instrument.mode & CONTINUOUS): # pylint: disable=superfluous-parens
|
||||
msg = '{} instrument does not support continuous measurement collection'
|
||||
raise ConfigError(msg.format(self.instrument))
|
||||
instrument.setup()
|
||||
|
||||
@@ -119,7 +119,7 @@ class FpsInstrument(Instrument):
|
||||
return
|
||||
|
||||
self._is_enabled = True
|
||||
#pylint: disable=redefined-variable-type
|
||||
# pylint: disable=redefined-variable-type
|
||||
if use_gfxinfo:
|
||||
self.collector = GfxInfoFramesInstrument(self.target, collector_target, self.period)
|
||||
self.processor = DerivedGfxInfoStats(self.drop_threshold, filename='fps.csv')
|
||||
@@ -128,12 +128,12 @@ class FpsInstrument(Instrument):
|
||||
self.processor = DerivedSurfaceFlingerStats(self.drop_threshold, filename='fps.csv')
|
||||
self.collector.reset()
|
||||
|
||||
def start(self, context): #pylint: disable=unused-argument
|
||||
def start(self, context): # pylint: disable=unused-argument
|
||||
if not self._is_enabled:
|
||||
return
|
||||
self.collector.start()
|
||||
|
||||
def stop(self, context): #pylint: disable=unused-argument
|
||||
def stop(self, context): # pylint: disable=unused-argument
|
||||
if not self._is_enabled:
|
||||
return
|
||||
self.collector.stop()
|
||||
|
||||
@@ -41,18 +41,18 @@ class HwmonInstrument(Instrument):
|
||||
hwmon data will be reported.
|
||||
"""
|
||||
|
||||
def initialize(self, context): #pylint: disable=unused-argument
|
||||
def initialize(self, context): # pylint: disable=unused-argument
|
||||
self.instrument = _Instrument(self.target)
|
||||
|
||||
def setup(self, context): #pylint: disable=unused-argument
|
||||
def setup(self, context): # pylint: disable=unused-argument
|
||||
self.instrument.reset()
|
||||
|
||||
@fast
|
||||
def start(self, context): #pylint: disable=unused-argument
|
||||
def start(self, context): # pylint: disable=unused-argument
|
||||
self.before = self.instrument.take_measurement()
|
||||
|
||||
@fast
|
||||
def stop(self, context): #pylint: disable=unused-argument
|
||||
def stop(self, context): # pylint: disable=unused-argument
|
||||
self.after = self.instrument.take_measurement()
|
||||
|
||||
def update_output(self, context):
|
||||
@@ -85,5 +85,5 @@ class HwmonInstrument(Instrument):
|
||||
"Don't know what to do with hwmon channel '{}'"
|
||||
.format(measurement_after.channel))
|
||||
|
||||
def teardown(self, context): #pylint: disable=unused-argument
|
||||
def teardown(self, context): # pylint: disable=unused-argument
|
||||
self.instrument.teardown()
|
||||
|
||||
@@ -50,8 +50,8 @@ class ScreenCaptureInstrument(Instrument):
|
||||
output_path,
|
||||
self.period)
|
||||
|
||||
def start(self, context): #pylint: disable=unused-argument
|
||||
def start(self, context): # pylint: disable=unused-argument
|
||||
self.collector.start()
|
||||
|
||||
def stop(self, context): #pylint: disable=unused-argument
|
||||
def stop(self, context): # pylint: disable=unused-argument
|
||||
self.collector.stop()
|
||||
|
||||
Reference in New Issue
Block a user