mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-01 19:02:31 +01:00
pep8: Ignore line break before binary operator
PEP8 has switched its guidance [1] for where a line break should occur in relation to a binary operator, so don't raise this warning for new code and update the code base to follow the new style. [1] https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
This commit is contained in:
@@ -201,16 +201,16 @@ class DelayInstrument(Instrument):
|
||||
reading = self.target.read_int(self.temperature_file)
|
||||
|
||||
def validate(self):
|
||||
if (self.temperature_between_specs is not None and
|
||||
self.fixed_between_specs is not None):
|
||||
if (self.temperature_between_specs is not None
|
||||
and self.fixed_between_specs is not None):
|
||||
raise ConfigError('Both fixed delay and thermal threshold specified for specs.')
|
||||
|
||||
if (self.temperature_between_jobs is not None and
|
||||
self.fixed_between_jobs is not None):
|
||||
if (self.temperature_between_jobs is not None
|
||||
and self.fixed_between_jobs is not None):
|
||||
raise ConfigError('Both fixed delay and thermal threshold specified for jobs.')
|
||||
|
||||
if (self.temperature_before_start is not None and
|
||||
self.fixed_before_start is not None):
|
||||
if (self.temperature_before_start is not None
|
||||
and self.fixed_before_start is not None):
|
||||
raise ConfigError('Both fixed delay and thermal threshold specified before start.')
|
||||
|
||||
if not any([self.temperature_between_specs, self.fixed_between_specs,
|
||||
|
@@ -169,9 +169,9 @@ class SysfsExtractor(Instrument):
|
||||
for paths in self.device_and_host_paths:
|
||||
after_dir = paths[self.AFTER_PATH]
|
||||
dev_dir = paths[self.DEVICE_PATH].strip('*') # remove potential trailing '*'
|
||||
if (not os.listdir(after_dir) and
|
||||
self.target.file_exists(dev_dir) and
|
||||
self.target.list_directory(dev_dir)):
|
||||
if (not os.listdir(after_dir)
|
||||
and self.target.file_exists(dev_dir)
|
||||
and self.target.list_directory(dev_dir)):
|
||||
self.logger.error('sysfs files were not pulled from the device.')
|
||||
self.device_and_host_paths.remove(paths) # Path is removed to skip diffing it
|
||||
for dev_dir, before_dir, after_dir, diff_dir in self.device_and_host_paths:
|
||||
|
Reference in New Issue
Block a user