Skip to content

Commit 4112476

Browse files
author
Thomas Preud'homme
committed
Fix under and over continuation indentation
Fix Flake8 E127 and E128 errors (under and over continuation indentation) Reviewed By: cmatthews Differential Revision: https://reviews.llvm.org/D94723
1 parent 508980c commit 4112476

File tree

9 files changed

+169
-132
lines changed

9 files changed

+169
-132
lines changed

lnt/lnttool/viewcomparison.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def action_view_comparison(report_a, report_b, hostname, port, dry_run,
8989
with contextlib.closing(config.get_database('default')) as db:
9090
session = db.make_session()
9191
import_and_report(config, 'default', db, session, report_a,
92-
'<auto>', testsuite, select_machine='match')
92+
'<auto>', testsuite, select_machine='match')
9393
import_and_report(config, 'default', db, session, report_b,
9494
'<auto>', testsuite, select_machine='match')
9595

lnt/server/db/testsuitedb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, v4db, name, test_suite):
5959
self.order_fields = list(self.test_suite.order_fields)
6060
self.run_fields = list(self.test_suite.run_fields)
6161
self.sample_fields = list(sorted(self.test_suite.sample_fields,
62-
key = lambda s: s.schema_index))
62+
key = lambda s: s.schema_index))
6363
self.machine_to_latest_order_cache = {}
6464
sample_field_indexes = dict()
6565

lnt/server/reporting/latestrunsreport.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def build(self, session):
2424
field_results = []
2525
for machine in machines:
2626
machine_results = []
27-
machine_runs = list(reversed(session.query(ts.Run)
27+
machine_runs = list(reversed(
28+
session.query(ts.Run)
2829
.filter(ts.Run.machine_id == machine.id)
2930
.order_by(ts.Run.start_time.desc())
3031
.limit(self.run_count)
@@ -38,12 +39,12 @@ def build(self, session):
3839
# take all tests from latest run and do a comparison
3940
oldest_run = machine_runs[0]
4041

41-
run_tests = session.query(ts.Test) \
42-
.join(ts.Sample) \
43-
.join(ts.Run) \
44-
.filter(ts.Sample.run_id == oldest_run.id) \
45-
.filter(ts.Sample.test_id == ts.Test.id) \
46-
.all()
42+
run_tests = (session.query(ts.Test)
43+
.join(ts.Sample)
44+
.join(ts.Run)
45+
.filter(ts.Sample.run_id == oldest_run.id)
46+
.filter(ts.Sample.test_id == ts.Test.id)
47+
.all())
4748

4849
# Create a run info object.
4950
sri = lnt.server.reporting.analysis.RunInfo(session, ts, machine_runs_ids)

lnt/server/reporting/report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def complete(self):
126126

127127
report_css_styles = {
128128
"body": ("color:#000000; background-color:#ffffff; "
129-
"font-family: Helvetica, sans-serif; font-size:9pt"),
129+
"font-family: Helvetica, sans-serif; font-size:9pt"),
130130
"table": ("font-size:9pt; border-spacing: 0px; "
131-
"border: 1px solid black"),
131+
"border: 1px solid black"),
132132
"th": (
133133
"background-color:#eee; color:#666666; font-weight: bold; "
134134
"cursor: default; text-align:center; font-weight: bold; "

lnt/server/ui/regression_views.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def v4_new_regressions():
6060
regression, _ = new_regression(session, ts, form.field_changes.data)
6161
flash("Created " + regression.title, FLASH_SUCCESS)
6262
return v4_redirect(v4_url_for(".v4_regression_list",
63-
highlight=regression.id))
63+
highlight=regression.id))
6464
if request.method == 'POST' and request.form['btn'] == "Ignore Changes":
6565
msg = "Ignoring changes: "
6666
ignored = []
@@ -158,7 +158,7 @@ def v4_regression_list():
158158
links.append(r.bug)
159159

160160
new_regress, _ = new_regression(session, ts,
161-
[x.field_change_id for x in reg_inds])
161+
[x.field_change_id for x in reg_inds])
162162
new_regress.state = regressions[target].state
163163
new_regress.title = regressions[target].title
164164
new_regress.bug = ' '.join(links)
@@ -298,8 +298,8 @@ def v4_regression_detail(id):
298298
session.commit()
299299
flash("Updated " + regression_info.title, FLASH_SUCCESS)
300300
return v4_redirect(v4_url_for(".v4_regression_list",
301-
highlight=regression_info.id,
302-
state=int(form.edit_state.data)))
301+
highlight=regression_info.id,
302+
state=int(form.edit_state.data)))
303303
if request.method == 'POST' and \
304304
request.form['save_btn'] == "Split Regression":
305305
# For each of the regression indicators, grab their field ids.
@@ -318,8 +318,8 @@ def v4_regression_detail(id):
318318
session.commit()
319319
flash("Split " + second_regression.title, FLASH_SUCCESS)
320320
return v4_redirect(v4_url_for(".v4_regression_list",
321-
highlight=second_regression.id,
322-
state=int(form.edit_state.data)))
321+
highlight=second_regression.id,
322+
state=int(form.edit_state.data)))
323323
if request.method == 'POST' and request.form['save_btn'] == "Delete":
324324
# For each of the regression indicators, grab their field ids.
325325
title = regression_info.title
@@ -334,7 +334,7 @@ def v4_regression_detail(id):
334334
session.commit()
335335
flash("Deleted " + title, FLASH_SUCCESS)
336336
return v4_redirect(v4_url_for(".v4_regression_list",
337-
state=int(form.edit_state.data)))
337+
state=int(form.edit_state.data)))
338338
form.field_changes.choices = list()
339339
form.state.default = regression_info.state
340340
form.process()

lnt/server/ui/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def v4_machine_compare(machine_id):
288288
.first()
289289

290290
return v4_redirect(v4_url_for('.v4_run', id=machine_1_run.id,
291-
compare_to=machine_2_run.id))
291+
compare_to=machine_2_run.id))
292292

293293

294294
@v4_route("/machine/<int:id>")
@@ -468,7 +468,7 @@ def simple_run(tag, id):
468468
# If we found one, redirect to it's report.
469469
if matched_run is not None:
470470
return v4_redirect(db_url_for(".v4_run", testsuite_name=tag,
471-
id=matched_run.id))
471+
id=matched_run.id))
472472

473473
# Otherwise, report an error.
474474
return render_template("error.html", message="""\
@@ -1421,8 +1421,8 @@ def v4_daily_report_overview():
14211421
extra_args.pop("day", None)
14221422

14231423
return v4_redirect(v4_url_for(".v4_daily_report",
1424-
year=date.year, month=date.month, day=date.day,
1425-
**extra_args))
1424+
year=date.year, month=date.month,
1425+
day=date.day, **extra_args))
14261426

14271427

14281428
@v4_route("/daily_report/<int:year>/<int:month>/<int:day>")

lnt/tests/nt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ def run_test(self, opts):
17161716

17171717
for i in range(opts.multisample):
17181718
print("%s: (multisample) running iteration %d" %\
1719-
(timestamp(), i), file=sys.stderr)
1719+
(timestamp(), i), file=sys.stderr)
17201720
report = run_test(opts.label, i, config)
17211721
reports.append(report)
17221722

tests/server/db/ImportV4TestSuiteInstance.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@
134134
assert sorted(run_b.parameters.items()) == [('inferred_run_order', '2')]
135135

136136
# Validate the samples.
137-
samples = list(session.query(ts.Sample)\
138-
.join(ts.Run) \
139-
.order_by(ts.Run.order_id, ts.Sample.id))
137+
samples = list(session.query(ts.Sample)
138+
.join(ts.Run)
139+
.order_by(ts.Run.order_id, ts.Sample.id))
140140
assert len(samples) == 3
141141
sample_a_0, sample_a_1, sample_b = samples
142142
assert sample_a_0.run is run_a

0 commit comments

Comments
 (0)