refactor, new model e.t.c.

This commit is contained in:
2025-03-31 01:12:01 +03:00
parent 6e2fbc23e9
commit 2918bc9f81
30 changed files with 144 additions and 233 deletions
+15 -4
View File
@@ -1,7 +1,18 @@
import re
from argenta.app import App
from argenta.command import Command
from argenta.router import Router
def test(string):
return bool(re.match(r'\ntest command\n(.|\s)*\nsome command\n', string))
router = Router()
print(test('test command tpgm4tigm4tigmt\n i0hhmi6h some command'))
@router.command(Command('test'))
def test():
print(f'test command')
@router.command(Command('some'))
def test2():
print(f'some command')
app = App()
app.include_router(router)
app.start_polling()
+2 -3
View File
@@ -2,10 +2,9 @@ from pprint import pprint
from rich.console import Console
from argenta.command import Command
from argenta.command.flag import FlagsGroup
from argenta.command.flag.defaults import DefaultFlags
from argenta.command.flag.registered_flag import FlagsGroup
from argenta.command.flag.registered_flag.defaults import DefaultFlags
from argenta.router import Router
from argenta.router.defaults import system_router
from .handlers_implementation.help_command import help_command