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
This commit is contained in:
CleverAgents Bot
2026-05-15 02:08:51 +00:00
committed by Forgejo
parent 15c4138aa3
commit a32ea46297
+5 -8
View File
@@ -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: