style(context): fix ruff formatting in priority context strategy steps

Apply ruff format to priority_context_strategy_steps.py to fix CI lint failure. Collapses unnecessary line breaks in decorator arguments, function calls, and assertion expressions.

ISSUES CLOSED: #9997
This commit is contained in:
2026-04-22 22:42:56 +00:00
committed by cleveragents-auto
parent 49ce9069be
commit d6dce223e7
@@ -123,9 +123,7 @@ def step_priority_strategy_custom_rules(
# ---------------------------------------------------------------------------
@given(
'a PriorityRule with field "{field}" matcher "{matcher}" and score {score:g}'
)
@given('a PriorityRule with field "{field}" matcher "{matcher}" and score {score:g}')
def step_priority_rule_construct(
context: Context, field: str, matcher: str, score: float
) -> None:
@@ -204,9 +202,7 @@ def step_empty_priority_fragments(context: Context) -> None:
@when("I assemble with the PriorityContextStrategy")
def step_assemble_priority(context: Context) -> None:
result = list(
context.strategy.assemble(
context.priority_fragments, context.strategy_budget
)
context.strategy.assemble(context.priority_fragments, context.strategy_budget)
)
# Set both context attributes so shared steps from context_strategies_steps.py
# (which use context.strategy_result) work correctly.
@@ -228,9 +224,7 @@ def step_can_handle_priority_no_query(context: Context) -> None:
@when("I register PriorityContextStrategy with the pipeline")
def step_register_priority_strategy(context: Context) -> None:
context.pipeline.register_strategy(
"priority_context", PriorityContextStrategy()
)
context.pipeline.register_strategy("priority_context", PriorityContextStrategy())
# ---------------------------------------------------------------------------
@@ -301,6 +295,4 @@ def step_priority_rule_matcher(context: Context, matcher: str) -> None:
@then("the PriorityRule score should be {score:g}")
def step_priority_rule_score(context: Context, score: float) -> None:
actual = context.priority_rule.score
assert abs(actual - score) < 1e-6, (
f"Expected score {score}, got {actual}"
)
assert abs(actual - score) < 1e-6, f"Expected score {score}, got {actual}"