From a32ea462977a084afa47f628189e73f5c75177ee Mon Sep 17 00:00:00 2001 From: CleverAgents Bot Date: Fri, 15 May 2026 02:08:51 +0000 Subject: [PATCH] fix(ci): resolve ruff lint issues in ACMS context benchmark - Move contextlib import to top of file (E402 fix) - Use contextlib.suppress(SystemExit) instead of try/except/pass blocks --- benchmarks/acms_context_cli_bench.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/benchmarks/acms_context_cli_bench.py b/benchmarks/acms_context_cli_bench.py index 5a873666d..c292fcef0 100644 --- a/benchmarks/acms_context_cli_bench.py +++ b/benchmarks/acms_context_cli_bench.py @@ -8,6 +8,7 @@ Measures the performance of: from __future__ import annotations +import contextlib import importlib import sys from pathlib import Path @@ -76,11 +77,9 @@ def _run_show_silent(view: str, fragments: list[Any]) -> None: "cleveragents.cli.renderers._get_console", return_value=mock_console, ), + contextlib.suppress(SystemExit), ): - try: - acms_context_show(view) - except SystemExit: - pass + acms_context_show(view) def _run_clear_silent( @@ -102,11 +101,9 @@ def _run_clear_silent( "cleveragents.cli.renderers._get_console", return_value=mock_console, ), + contextlib.suppress(SystemExit), ): - try: - acms_context_clear(tier=tier, yes=True) - except SystemExit: - pass + acms_context_clear(tier=tier, yes=True) class FormatBudgetUtilizationSuite: