fix(lint): apply ruff formatting to a2a_module_rename_standardization_steps
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 48s
CI / helm (pull_request) Successful in 1m4s
CI / lint (pull_request) Successful in 1m26s
CI / build (pull_request) Successful in 1m35s
CI / benchmark-regression (pull_request) Failing after 1m16s
CI / typecheck (pull_request) Successful in 1m59s
CI / quality (pull_request) Successful in 1m58s
CI / security (pull_request) Successful in 2m49s
CI / integration_tests (pull_request) Successful in 4m39s
CI / unit_tests (pull_request) Successful in 6m4s
CI / e2e_tests (pull_request) Successful in 6m38s
CI / docker (pull_request) Successful in 2m37s
CI / coverage (pull_request) Successful in 23m59s
CI / status-check (pull_request) Successful in 5s

The feature step definitions file had ruff format violations that
caused CI / lint to fail. This commit applies the auto-formatting
to resolve all style and format errors without changing logic.
This commit is contained in:
2026-05-13 00:00:32 +00:00
parent 657ca1ff85
commit c91e5b114f
@@ -67,6 +67,7 @@ def _scan_dir_for_pattern(root: Path, pattern_str: str) -> int:
# ── Given steps ────────────────────────────────────────────────────────────
@given('the "a2a" Python package is importable from "cleveragents.a2a"')
def step_a2a_importable(context: Any) -> None:
"""Ensure cleveragents.a2a can be imported."""
@@ -78,10 +79,12 @@ def step_a2a_importable(context: Any) -> None:
# ── When steps ─────────────────────────────────────────────────────────────
@when('I import "cleveragents.a2a"')
def step_import_a2a(context: Any) -> None:
"""Import the a2a package and store it on context."""
import cleveragents.a2a
context._a2a_module = cleveragents.a2a
@@ -105,7 +108,7 @@ def step_scan_a2a_python_files(context: Any) -> None:
context._a2a_scan_root = str(a2a_dir)
@when("I search for the legacy prefix string \"ACP\"")
@when('I search for the legacy prefix string "ACP"')
def step_search_acp_pattern(context: Any) -> None:
"""Perform recursive scan and store results."""
count = _scan_dir_for_pattern(Path(context._a2a_scan_root), "ACP")
@@ -116,13 +119,15 @@ def step_search_acp_pattern(context: Any) -> None:
def step_read_a2a_docstring(context: Any) -> None:
"""Store the a2a package docstring on context."""
import cleveragents.a2a as a2a_pkg
assert a2a_pkg.__doc__ is not None, "cleveragents.a2a has no __doc__"
context._a2a_docstring = a2a_pkg.__doc__
# ── Then steps ─────────────────────────────────────────────────────────────
@then('every symbol should resolve to a non-None object')
@then("every symbol should resolve to a non-None object")
def step_all_symbols_resolved(context: Any) -> None:
"""Assert every expected symbol is present and non-None."""
module = context._a2a_module
@@ -134,7 +139,7 @@ def step_all_symbols_resolved(context: Any) -> None:
assert not missing, f"Missing symbols: {missing}"
@then('the count of exported symbols should equal 22')
@then("the count of exported symbols should equal 22")
def step_symbol_count_is_22(context: Any) -> None:
"""Assert __all__ has exactly 22 entries."""
actual_all = context._a2a_module.__all__
@@ -143,7 +148,7 @@ def step_symbol_count_is_22(context: Any) -> None:
)
@then("zero instances of \"ACP\" should be found")
@then('zero instances of "ACP" should be found')
def step_zero_acp_references(context: Any) -> None:
"""Assert zero ACP remnants were found."""
assert context._acp_references_found == 0, (
@@ -177,6 +182,7 @@ def step_docstring_references_adr(context: Any) -> None:
@then('the docstring should NOT contain any mentions of "ACP protocol"')
def step_no_acp_protocol_mention(context: Any) -> None:
"""Assert docstring does not reference ACP."""
assert "ACP(protocol)" not in context._a2a_docstring and "ACP protocol" not in context._a2a_docstring, (
f"Docstring contains legacy 'ACP protocol':\n{context._a2a_docstring[:500]}"
)
assert (
"ACP(protocol)" not in context._a2a_docstring
and "ACP protocol" not in context._a2a_docstring
), f"Docstring contains legacy 'ACP protocol':\n{context._a2a_docstring[:500]}"