Skip to content

Commit e660b76

Browse files
committed
format
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent c963d4a commit e660b76

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

.mise/tasks/lint-bom.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
# [MISE] description="Make sure the BOM has all necessary modules"
44

5-
import os
5+
import difflib
66
import re
77
import sys
88
from fnmatch import fnmatch
99
from pathlib import Path
1010
from typing import List
11-
import difflib
1211

1312
ROOT = Path(__file__).resolve().parents[2] # repo root (.. from .mise/tasks)
1413
IGNORE_DIRS = {"prometheus-metrics-parent"}

.mise/tasks/test_update-benchmarks.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
import tempfile
55
import unittest
66

7+
from update_benchmarks import update_pre_blocks_under_module
8+
79
# Ensure the tasks directory is importable when running the test directly
810
here = os.path.dirname(__file__)
911
if here not in sys.path:
1012
sys.path.insert(0, here)
1113

12-
from update_benchmarks import update_pre_blocks_under_module
13-
14-
1514
class TestRunBenchmarksFiltering(unittest.TestCase):
1615
def setUp(self):
1716
# sample JMH table with mixed-class lines

.mise/tasks/update_benchmarks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ def extract_first_table(jmh_output: str) -> str:
108108
m = re.search(r"(\nBenchmark\s+Mode[\s\S]*?)(?:\n\s*\n|\Z)", jmh_output)
109109
if not m:
110110
# fallback: collect all lines that contain 'thrpt' plus a header if present
111-
lines = [l for l in jmh_output.splitlines() if "thrpt" in l]
111+
lines = [line for line in jmh_output.splitlines() if "thrpt" in line]
112112
if not lines:
113113
raise ValueError('Could not find any "thrpt" lines in JMH output')
114114
# try to find header
115115
header = next(
116116
(
117-
l
118-
for l in jmh_output.splitlines()
119-
if l.startswith("Benchmark") and "Mode" in l
117+
line
118+
for line in jmh_output.splitlines()
119+
if line.startswith("Benchmark") and "Mode" in line
120120
),
121121
"Benchmark Mode Cnt Score Error Units",
122122
)

0 commit comments

Comments
 (0)