Skip to content

Commit 2fdf8d0

Browse files
fix: linter warnings
Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
1 parent f01a3ad commit 2fdf8d0

4 files changed

Lines changed: 11 additions & 12 deletions

File tree

backend/kernelCI_app/helpers/treeCompare.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,7 @@ def build_boot_test_compare_filter_clauses( # noqa: C901 - maps FilterParams fi
162162
filters.filterBootPath if data_type == "boots" else filters.filterTestPath
163163
)
164164
if path_filter:
165-
pre_join.append(
166-
"AND COALESCE(t.path, '') LIKE '%%' || %(test_path)s || '%%'"
167-
)
165+
pre_join.append("AND COALESCE(t.path, '') LIKE '%%' || %(test_path)s || '%%'")
168166
params["test_path"] = path_filter
169167

170168
origin_filter = (

backend/kernelCI_app/queries/tree.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,6 @@ def get_tree_commit_history_hashes_aggregated(
994994
return rows
995995

996996

997-
998997
def get_tree_compare_boots_tests_diff(
999998
*,
1000999
data_type: Literal["boots", "tests"],
@@ -1016,7 +1015,10 @@ def get_tree_compare_boots_tests_diff(
10161015
Duration kwargs are accepted for call-site compat but ignored: filtering by
10171016
duration before the A/B join invents false appeared/disappeared rows.
10181017
"""
1019-
del boots_duration, tests_duration # ponytail: post-join duration needs selected cols
1018+
del (
1019+
boots_duration,
1020+
tests_duration,
1021+
) # ponytail: post-join duration needs selected cols
10201022
commit_hashes = [hash_a, hash_b]
10211023
filter_sql = build_boot_test_compare_filter_clauses(filters, data_type)
10221024

@@ -1695,7 +1697,6 @@ def get_tree_compare_builds_diff(
16951697
return rows
16961698

16971699

1698-
16991700
# Keep in sync with dashboard deriveCompareChange (INCONCLUSIVE transitions included).
17001701
_CHANGE_COUNT_SELECT = """
17011702
COUNT(*) FILTER (
@@ -1925,9 +1926,7 @@ def _get_tree_compare_boots_tests_change_counts(
19251926
if data_type == "boots":
19261927
path_filter = "AND (t.path = 'boot' OR t.path LIKE 'boot.%%')"
19271928
else:
1928-
path_filter = (
1929-
"AND t.path IS DISTINCT FROM 'boot' AND t.path NOT LIKE 'boot.%%'"
1930-
)
1929+
path_filter = "AND t.path IS DISTINCT FROM 'boot' AND t.path NOT LIKE 'boot.%%'"
19311930

19321931
query = f"""
19331932
WITH RELEVANT_CHECKOUTS AS (

backend/kernelCI_app/tests/unitTests/helpers/treeCompare_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def test_status_is_post_join_grouped(self):
3737
self._filters({"filter_build.status": ["FAIL", "NULL"]})
3838
)
3939
self.assertEqual(result.pre_join, "")
40-
self.assertIn("a.grouped_status = ANY(%(grouped_build_statuses)s)", result.post_join)
40+
self.assertIn(
41+
"a.grouped_status = ANY(%(grouped_build_statuses)s)", result.post_join
42+
)
4143
self.assertCountEqual(
4244
result.params["grouped_build_statuses"],
4345
["FAIL", "INCONCLUSIVE"],

dashboard/src/locales/messages/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,6 @@ export const messages = {
410410
'Compare pass/fail counts between two revisions on the same tree and branch.',
411411
'treeCompare.drilldownHint':
412412
'Individual builds, boots, and tests that changed between Side A and Side B.',
413-
'treeCompare.needTwoRevisions':
414-
'Select two different revisions to compare. This tree needs at least two commits with results.',
415413
'treeCompare.failures.change': 'Change',
416414
'treeCompare.failures.configArch': 'Config / Arch',
417415
'treeCompare.failures.pathArch': 'Path / Arch',
@@ -426,6 +424,8 @@ export const messages = {
426424
'treeCompare.matrix.pass': 'pass',
427425
'treeCompare.matrix.regressions': 'regressions',
428426
'treeCompare.matrix.tests': 'tests',
427+
'treeCompare.needTwoRevisions':
428+
'Select two different revisions to compare. This tree needs at least two commits with results.',
429429
'treeCompare.openCompare': 'Compare revisions',
430430
'treeCompare.selectRevision': 'Select a revision',
431431
'treeCompare.sideA': 'Side A',

0 commit comments

Comments
 (0)