From 809b7823ea709c4707bea24e3243ce25cce56dbe Mon Sep 17 00:00:00 2001 From: Kharec Date: Mon, 5 Jan 2026 20:38:09 +0100 Subject: [PATCH] refactor: type command metadata --- skywipe/commands.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/skywipe/commands.py b/skywipe/commands.py index 2f53b11..2e170aa 100644 --- a/skywipe/commands.py +++ b/skywipe/commands.py @@ -1,6 +1,6 @@ """Command implementations for Skywipe""" -from typing import Callable, Any +from typing import Callable, Any, TypedDict from .configure import Configuration from .operations import Operation from .post_analysis import PostAnalyzer @@ -11,7 +11,16 @@ from .safeguard import require_confirmation CommandHandler = Callable[..., None] -COMMAND_METADATA = { +class CommandMetadata(TypedDict): + confirmation: str + help_text: str + operation_name: str + strategy_type: str + collection: str | None + filter_fn: Callable[[Any], bool] | None + + +COMMAND_METADATA: dict[str, CommandMetadata] = { "posts": { "confirmation": "delete all posts", "help_text": "only posts",