diff --git a/features/steps/acms_context_show_clear_steps.py b/features/steps/acms_context_show_clear_steps.py index 71a7b19a0..b9ee251c7 100644 --- a/features/steps/acms_context_show_clear_steps.py +++ b/features/steps/acms_context_show_clear_steps.py @@ -316,6 +316,4 @@ def step_then_clear_json_key(context: Any, key: str) -> None: @then("the acms clear should require confirmation") def step_then_clear_needs_confirm(context: Any) -> None: - assert context.clear_needs_confirm is True, ( - "Expected clear to require confirmation" - ) + assert context.clear_needs_confirm is True, "Expected clear to require confirmation" diff --git a/src/cleveragents/application/services/context_tiers.py b/src/cleveragents/application/services/context_tiers.py index 6109a9477..866c03418 100644 --- a/src/cleveragents/application/services/context_tiers.py +++ b/src/cleveragents/application/services/context_tiers.py @@ -450,9 +450,7 @@ class ContextTierService(TierRuntimeMixin, ScopedTierMixin): with self._lock: for fid in fragment_ids: before = ( - (fid in self._hot) - or (fid in self._warm) - or (fid in self._cold) + (fid in self._hot) or (fid in self._warm) or (fid in self._cold) ) if before: self._remove_from_all(fid) diff --git a/src/cleveragents/cli/commands/acms_context.py b/src/cleveragents/cli/commands/acms_context.py index 82053a9c4..64caefa29 100644 --- a/src/cleveragents/cli/commands/acms_context.py +++ b/src/cleveragents/cli/commands/acms_context.py @@ -31,9 +31,7 @@ from cleveragents.application.services.context_tiers import ContextTierService from cleveragents.domain.models.acms.tiers import ContextTier, TieredFragment app = typer.Typer( - help=( - "ACMS context index: inspect assembled context and remove stale entries" - ) + help=("ACMS context index: inspect assembled context and remove stale entries") ) console = Console() err_console = Console(stderr=True) @@ -246,9 +244,7 @@ def _apply_clear_filters( to_remove.append(frag) # Remove matched fragments - removed_count = tier_service.remove_by_filter( - [f.fragment_id for f in to_remove] - ) + removed_count = tier_service.remove_by_filter([f.fragment_id for f in to_remove]) # Count remaining if project_names: @@ -324,8 +320,7 @@ def acms_show( """ if view not in _VALID_VIEWS: err_console.print( - f"[red]Invalid view '{view}': must be one of " - f"{sorted(_VALID_VIEWS)}[/red]" + f"[red]Invalid view '{view}': must be one of {sorted(_VALID_VIEWS)}[/red]" ) raise typer.Exit(1) @@ -451,8 +446,7 @@ def acms_clear( ContextTier(tier_filter) except ValueError: err_console.print( - f"[red]Invalid tier '{tier_filter}': " - f"must be hot, warm, or cold[/red]" + f"[red]Invalid tier '{tier_filter}': must be hot, warm, or cold[/red]" ) raise typer.Exit(1) from None @@ -493,9 +487,7 @@ def acms_clear( if tier_filter: filter_parts.append(f"tier={tier_filter!r}") filter_desc = ", ".join(filter_parts) - confirmed = typer.confirm( - f"Remove ACMS entries matching {filter_desc}?" - ) + confirmed = typer.confirm(f"Remove ACMS entries matching {filter_desc}?") if not confirmed: console.print("[yellow]Cancelled.[/yellow]") raise typer.Exit(0)