mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
final work on autocomplete
This commit is contained in:
@@ -1,36 +1,32 @@
|
||||
from rich.console import Console
|
||||
|
||||
from argenta.command import Command
|
||||
from argenta.command.flag import Flags, InputFlags, Flag
|
||||
from argenta.command.flag import Flags, InputFlags
|
||||
from argenta.command.flag.defaults import PredeterminedFlags
|
||||
from argenta.router import Router
|
||||
from .handlers_implementation.help_command import help_command
|
||||
|
||||
|
||||
work_router: Router = Router(title='Work points:')
|
||||
work_router.set_invalid_input_flag_handler(lambda flag: print(f'Invalid input flag: {flag.get_string_entity()} {flag.get_value() if flag.get_value() else ''}'))
|
||||
|
||||
settings_router: Router = Router(title='Settings points:')
|
||||
|
||||
|
||||
console = Console()
|
||||
|
||||
flag = Flag('test')
|
||||
|
||||
|
||||
@work_router.command(Command('0', 'Get Help'))
|
||||
def command_help():
|
||||
help_command()
|
||||
|
||||
|
||||
@work_router.command(Command('S', 'Start Solving', Flags(PredeterminedFlags.HOST, PredeterminedFlags.PORT, flag)))
|
||||
@work_router.command(Command('S', 'Start Solving', Flags(PredeterminedFlags.HOST, PredeterminedFlags.PORT)))
|
||||
def command_start_solving(args: InputFlags):
|
||||
print(args.get_flag('test'))
|
||||
|
||||
|
||||
@settings_router.command(Command('U', 'Update WordMath'))
|
||||
def command_update():
|
||||
pass
|
||||
print('eeeeeee')
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user