1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 11:22:41 +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:
Marc Bonnici
2020-10-19 18:09:04 +01:00
committed by setrofim
parent fbb84eca72
commit aa4df95a69
19 changed files with 63 additions and 63 deletions

View File

@@ -134,8 +134,8 @@ class CpuStatesProcessor(OutputProcessor):
parallel_rows.append([job_id, workload, iteration] + record)
for state in sorted(powerstate_report.state_stats):
stats = powerstate_report.state_stats[state]
powerstate_rows.append([job_id, workload, iteration, state] +
['{:.3f}'.format(s if s is not None else 0)
powerstate_rows.append([job_id, workload, iteration, state]
+ ['{:.3f}'.format(s if s is not None else 0)
for s in stats])
outpath = output.get_path('parallel-stats.csv')

View File

@@ -90,8 +90,8 @@ class CsvReportProcessor(OutputProcessor):
outfile = output.get_path('results.csv')
with csvwriter(outfile) as writer:
writer.writerow(['id', 'workload', 'iteration', 'metric', ] +
extra_columns + ['value', 'units'])
writer.writerow(['id', 'workload', 'iteration', 'metric', ]
+ extra_columns + ['value', 'units'])
for o in outputs:
if o.kind == 'job':
@@ -106,8 +106,8 @@ class CsvReportProcessor(OutputProcessor):
'Output of kind "{}" unrecognised by csvproc'.format(o.kind))
for metric in o.result.metrics:
row = (header + [metric.name] +
[str(metric.classifiers.get(c, ''))
for c in extra_columns] +
[str(metric.value), metric.units or ''])
row = (header + [metric.name]
+ [str(metric.classifiers.get(c, ''))
for c in extra_columns]
+ [str(metric.value), metric.units or ''])
writer.writerow(row)

View File

@@ -124,8 +124,8 @@ class PostgresqlResultProcessor(OutputProcessor):
if not psycopg2:
raise ImportError(
'The psycopg2 module is required for the ' +
'Postgresql Output Processor: {}'.format(import_error_msg))
'The psycopg2 module is required for the '
+ 'Postgresql Output Processor: {}'.format(import_error_msg))
# N.B. Typecasters are for postgres->python and adapters the opposite
self.connect_to_database()
@@ -515,8 +515,8 @@ class PostgresqlResultProcessor(OutputProcessor):
self.conn = connect(dsn=dsn)
except Psycopg2Error as e:
raise OutputProcessorError(
"Database error, if the database doesn't exist, " +
"please use 'wa create database' to create the database: {}".format(e))
"Database error, if the database doesn't exist, "
+ "please use 'wa create database' to create the database: {}".format(e))
self.cursor = self.conn.cursor()
self.verify_schema_versions()