style(decomposition): fix ruff format violations in decision correction files
CI / lint (pull_request) Failing after 0s
CI / typecheck (pull_request) Failing after 0s
CI / security (pull_request) Failing after 1s
CI / quality (pull_request) Failing after 1s
CI / coverage (pull_request) Has been skipped
CI / helm (pull_request) Failing after 0s
CI / build (pull_request) Failing after 1s
CI / push-validation (pull_request) Failing after 0s
CI / integration_tests (pull_request) Successful in 3m51s
CI / e2e_tests (pull_request) Successful in 4m10s
CI / unit_tests (pull_request) Successful in 4m18s
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 1h14m10s

Apply ruff format to decomposition_decision_correction_steps.py and
decomposition_service.py to fix CI lint job format check failures.

ISSUES CLOSED: #10012
This commit is contained in:
2026-04-22 22:22:35 +00:00
committed by Forgejo
parent 2acf1e5478
commit 8e25e31218
2 changed files with 25 additions and 11 deletions
@@ -71,7 +71,12 @@ def _make_simple_hierarchy() -> DecompositionResult:
node_id="middle_a",
parent_id="root",
depth=1,
file_paths=["src/a/file1.py", "src/a/file2.py", "src/a/file3.py", "src/a/file4.py"],
file_paths=[
"src/a/file1.py",
"src/a/file2.py",
"src/a/file3.py",
"src/a/file4.py",
],
language=".py",
directory_prefix="src/a",
estimated_tokens=200,
@@ -94,8 +99,12 @@ def _make_simple_hierarchy() -> DecompositionResult:
parent_id=None,
depth=0,
file_paths=[
"src/a/file1.py", "src/a/file2.py", "src/a/file3.py", "src/a/file4.py",
"src/b/file1.py", "src/b/file2.py",
"src/a/file1.py",
"src/a/file2.py",
"src/a/file3.py",
"src/a/file4.py",
"src/b/file1.py",
"src/b/file2.py",
],
language=".py",
directory_prefix="src",
@@ -229,9 +238,11 @@ def step_then_siblings_preserved(context: Any) -> None:
"""Check that sibling nodes are preserved when a leaf is recomputed."""
result: DecisionCorrectionResult = context.correction_result
preserved_ids = result.preserved_node_ids
assert "leaf_a2" in preserved_ids or "middle_b" in preserved_ids or "leaf_b1" in preserved_ids, (
f"Expected sibling nodes in preserved set, got {preserved_ids}"
)
assert (
"leaf_a2" in preserved_ids
or "middle_b" in preserved_ids
or "leaf_b1" in preserved_ids
), f"Expected sibling nodes in preserved set, got {preserved_ids}"
@then("ancestor nodes should be in the preserved set")
@@ -239,9 +250,11 @@ def step_then_ancestors_preserved(context: Any) -> None:
"""Check that ancestor nodes are preserved."""
result: DecisionCorrectionResult = context.correction_result
preserved_ids = result.preserved_node_ids
assert "root" in preserved_ids or "middle_a" in preserved_ids or "middle_b" in preserved_ids, (
f"Expected ancestor nodes in preserved set, got {preserved_ids}"
)
assert (
"root" in preserved_ids
or "middle_a" in preserved_ids
or "middle_b" in preserved_ids
), f"Expected ancestor nodes in preserved set, got {preserved_ids}"
@then("sibling branches should not be in the recomputed set")
@@ -300,7 +313,9 @@ def step_then_has_preserved_node_ids(context: Any) -> None:
def step_then_has_metrics(context: Any) -> None:
"""Check that the result has metrics."""
result: DecisionCorrectionResult = context.correction_result
assert isinstance(result.metrics, dict), f"Expected dict, got {type(result.metrics)}"
assert isinstance(result.metrics, dict), (
f"Expected dict, got {type(result.metrics)}"
)
assert len(result.metrics) > 0, f"Expected non-empty metrics, got {result.metrics}"
@@ -393,7 +393,6 @@ class DecompositionService:
"""
return self._closure_computer.compute_closure(graph, root_files, cutoff)
def recompute_subtree(
self,
node_id: str,