Add CommandArgumentParser and integrate argument parsing from cli and menu prompt
This commit is contained in:
@ -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]: ...
|
||||
|
Reference in New Issue
Block a user