mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 03:12:34 +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:
@@ -84,9 +84,9 @@ class PluginCache(object):
|
||||
'defined in a config file, move the entry content into the top level'
|
||||
raise ConfigError(msg.format((plugin_name)))
|
||||
|
||||
if (not self.loader.has_plugin(plugin_name) and
|
||||
plugin_name not in self.targets and
|
||||
plugin_name not in GENERIC_CONFIGS):
|
||||
if (not self.loader.has_plugin(plugin_name)
|
||||
and plugin_name not in self.targets
|
||||
and plugin_name not in GENERIC_CONFIGS):
|
||||
msg = 'configuration provided for unknown plugin "{}"'
|
||||
raise ConfigError(msg.format(plugin_name))
|
||||
|
||||
@@ -95,8 +95,8 @@ class PluginCache(object):
|
||||
raise ConfigError(msg.format(plugin_name, repr(values), type(values)))
|
||||
|
||||
for name, value in values.items():
|
||||
if (plugin_name not in GENERIC_CONFIGS and
|
||||
name not in self.get_plugin_parameters(plugin_name)):
|
||||
if (plugin_name not in GENERIC_CONFIGS
|
||||
and name not in self.get_plugin_parameters(plugin_name)):
|
||||
msg = "'{}' is not a valid parameter for '{}'"
|
||||
raise ConfigError(msg.format(name, plugin_name))
|
||||
|
||||
|
@@ -128,8 +128,8 @@ class ExecutionContext(object):
|
||||
self.run_state.status = status
|
||||
self.run_output.status = status
|
||||
self.run_output.info.end_time = datetime.utcnow()
|
||||
self.run_output.info.duration = (self.run_output.info.end_time -
|
||||
self.run_output.info.start_time)
|
||||
self.run_output.info.duration = (self.run_output.info.end_time
|
||||
- self.run_output.info.start_time)
|
||||
self.write_output()
|
||||
|
||||
def finalize(self):
|
||||
|
@@ -268,8 +268,8 @@ class RunOutput(Output, RunOutputCommon):
|
||||
self._combined_config = None
|
||||
self.jobs = []
|
||||
self.job_specs = []
|
||||
if (not os.path.isfile(self.statefile) or
|
||||
not os.path.isfile(self.infofile)):
|
||||
if (not os.path.isfile(self.statefile)
|
||||
or not os.path.isfile(self.infofile)):
|
||||
msg = '"{}" does not exist or is not a valid WA output directory.'
|
||||
raise ValueError(msg.format(self.basepath))
|
||||
self.reload()
|
||||
|
@@ -166,8 +166,8 @@ class AndroidAssistant(object):
|
||||
else:
|
||||
parser = LogcatParser()
|
||||
for event in parser.parse(outfile):
|
||||
if (event.tag == self._logcat_marker_tag and
|
||||
event.message == self._logcat_marker_msg):
|
||||
if (event.tag == self._logcat_marker_tag
|
||||
and event.message == self._logcat_marker_msg):
|
||||
return True
|
||||
|
||||
return False
|
||||
@@ -275,8 +275,8 @@ class LogcatPoller(threading.Thread):
|
||||
counter = self._start_marker
|
||||
for event in parser.parse(outfile):
|
||||
message = self._logcat_marker_msg.split(':')[0]
|
||||
if not (event.tag == self._logcat_marker_tag and
|
||||
event.message.split(':')[0] == message):
|
||||
if not (event.tag == self._logcat_marker_tag
|
||||
and event.message.split(':')[0] == message):
|
||||
continue
|
||||
|
||||
number = int(event.message.split(':')[1])
|
||||
|
Reference in New Issue
Block a user