Skip to content

Commit 6507233

Browse files
committed
fix ruff warnings
1 parent becf2b1 commit 6507233

4 files changed

+11
-9
lines changed

util/compare_gnu_result.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python3
22

33
"""
4-
Compare the current results to the last results gathered from the main branch to highlight
5-
if a PR is making the results better/worse.
4+
Compare the current results to the last results gathered from the main branch to
5+
highlight if a PR is making the results better/worse.
66
Don't exit with error code if all failing tests are in the ignore-intermittent.txt list.
77
"""
88

@@ -28,13 +28,15 @@
2828

2929
# Get an annotation to highlight changes
3030
print(
31-
f"::warning ::Changes from '{REPO_DEFAULT_BRANCH}': PASS {pass_d:+d} / FAIL {fail_d:+d} / ERROR {error_d:+d} / SKIP {skip_d:+d} "
31+
f"""::warning ::Changes from '{REPO_DEFAULT_BRANCH}': PASS {pass_d:+d} /
32+
FAIL {fail_d:+d} / ERROR {error_d:+d} / SKIP {skip_d:+d}"""
3233
)
3334

3435
# If results are worse, check if we should fail the job
3536
if pass_d < 0:
3637
print(
37-
f"::error ::PASS count is reduced from '{REPO_DEFAULT_BRANCH}': PASS {pass_d:+d} "
38+
f"""::error ::PASS count is reduced from
39+
'{REPO_DEFAULT_BRANCH}': PASS {pass_d:+d}"""
3840
)
3941

4042
# Check if all failing tests are intermittent based on the environment variable

util/gnu-json-result.py

-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,4 @@
3737
except Exception as e:
3838
print(f"Error processing file {path}: {e}", file=sys.stderr)
3939

40-
4140
print(json.dumps(out, indent=2, sort_keys=True))

util/remaining-gnu-error.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
list_of_files = sorted(tests, key=lambda x: os.stat(x).st_size)
4040

4141

42-
def show_list(l):
42+
def show_list(list_test):
4343
# Remove the factor tests and reverse the list (bigger first)
44-
tests = list(filter(lambda k: "factor" not in k, l))
44+
tests = list(filter(lambda k: "factor" not in k, list_test))
4545

4646
for f in reversed(tests):
4747
if contains_require_root(f):

util/size-experiment.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ def collect_diff(idx, name):
7575
collect_diff(3, "lto")
7676

7777

78-
def analyze(l):
79-
return f"MIN: {float(min(l)):.3}, AVG: {float(sum(l)/len(l)):.3}, MAX: {float(max(l)):.3}"
78+
def analyze(change):
79+
return f"""MIN: {float(min(change)):.3},
80+
AVG: {float(sum(change)/len(change)):.3}, MAX: {float(max(change)):.3}"""
8081

8182

8283
print("Absolute changes")

0 commit comments

Comments
 (0)