Add CommandArgumentParser and integrate argument parsing from cli and menu prompt

This commit is contained in:
2025-05-17 21:10:50 -04:00
parent b14004c989
commit 62276debd5
11 changed files with 1416 additions and 40 deletions

View File

@ -2,10 +2,16 @@
"""protocols.py"""
from __future__ import annotations
from typing import Any, Awaitable, Protocol
from typing import Any, Awaitable, Protocol, runtime_checkable
from falyx.action.action import BaseAction
@runtime_checkable
class ActionFactoryProtocol(Protocol):
async def __call__(self, *args: Any, **kwargs: Any) -> Awaitable[BaseAction]: ...
@runtime_checkable
class ArgParserProtocol(Protocol):
def __call__(self, args: list[str]) -> tuple[tuple, dict]: ...