Skip to content

Commit a74d949

Browse files
committed
Apply pre-commit formatting fixes
1 parent ed5c5da commit a74d949

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

eval/evaluate_browser_agent.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,9 @@ def run_test(
11721172
# The live SSE stream can end right after `complete` and miss the
11731173
# persisted usage_metrics snapshots. Recover them before saving
11741174
# artifacts or computing costs.
1175-
sse_events = self._recover_usage_metrics_for_run(conversation_id, sse_events)
1175+
sse_events = self._recover_usage_metrics_for_run(
1176+
conversation_id, sse_events
1177+
)
11761178

11771179
# Extract and save SSE events (excluding images) to file
11781180
sse_events_file = self._save_sse_events(
@@ -2648,7 +2650,9 @@ def fetch_usage_rows(conversation_id: str) -> List[Dict[str, Any]]:
26482650
for timestamp in (event.get("timestamp") for event in sse_events)
26492651
if isinstance(timestamp, (int, float))
26502652
]
2651-
duration = max(timestamps) - min(timestamps) if len(timestamps) >= 2 else 0.0
2653+
duration = (
2654+
max(timestamps) - min(timestamps) if len(timestamps) >= 2 else 0.0
2655+
)
26522656
cost = recovered_costs.get(conversation_id)
26532657
efficiency_score = self._calculate_efficiency_score(
26542658
duration, test_case.time_limit
@@ -2702,8 +2706,7 @@ def fetch_usage_rows(conversation_id: str) -> List[Dict[str, Any]]:
27022706

27032707
models = list(
27042708
dict.fromkeys(
2705-
rebuilt_result.model or "unknown"
2706-
for rebuilt_result in rebuilt_results
2709+
rebuilt_result.model or "unknown" for rebuilt_result in rebuilt_results
27072710
)
27082711
)
27092712

extension/src/__tests__/background-cleanup-regression.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ describe('Background cleanup regressions', () => {
5252
expect(backgroundSource).toContain(
5353
'fullPageScanOnNotReady: attempt === maxHighlightAttempts',
5454
);
55-
expect(backgroundSource).toContain(
56-
'const maxHighlightAttempts = 3;',
57-
);
55+
expect(backgroundSource).toContain('const maxHighlightAttempts = 3;');
5856
});
5957

6058
test('navigation defaults prime the page with a raw screenshot before highlight', () => {

extension/src/__tests__/highlight-detection.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ describe('highlight-detection helpers', () => {
162162
test('buildHighlightDetectionScript excludes visually hidden screen-reader nodes', () => {
163163
const script = buildHighlightDetectionScript({ elementType: 'any' });
164164
const start = script.indexOf('function isElementVisibleForDetection');
165-
const end = script.indexOf('function isElementInViewportForDetection', start);
165+
const end = script.indexOf(
166+
'function isElementInViewportForDetection',
167+
start,
168+
);
166169
const visibilitySource = script.slice(start, end);
167170

168171
expect(script).toContain('const VISUALLY_HIDDEN_TOKEN_REGEX');

extension/src/commands/highlight-detection.injected.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,7 @@ function isVisuallyHiddenForDetection(el) {
222222
return (
223223
tinyBox &&
224224
(hidesOverflow || isClipped || style.whiteSpace === 'nowrap') &&
225-
(style.position === 'absolute' ||
226-
style.position === 'fixed' ||
227-
isOffscreen)
225+
(style.position === 'absolute' || style.position === 'fixed' || isOffscreen)
228226
);
229227
}
230228

0 commit comments

Comments
 (0)