mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
fix tests and improve perf
This commit is contained in:
+12
-12
@@ -1,14 +1,14 @@
|
||||
from argenta import Command, Response, Router, App, Orchestrator
|
||||
from argenta.command import InputCommand
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
router = Router()
|
||||
orchestrator = Orchestrator()
|
||||
|
||||
@router.command(Command('test'))
|
||||
def test(_response: Response) -> None: # pyright: ignore[reportUnusedFunction]
|
||||
print('test command')
|
||||
|
||||
app = App(override_system_messages=True, print_func=print)
|
||||
app.include_router(router)
|
||||
app.set_unknown_command_handler(lambda command: print(f'Unknown command: {command.trigger}'))
|
||||
orchestrator.start_polling(app)
|
||||
class Figure(ABC):
|
||||
@abstractmethod
|
||||
def draw(self) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
class Rectangle(Figure):
|
||||
def __init__(self, x: int, y: int) -> None:
|
||||
self.x = x
|
||||
self.y = y
|
||||
|
||||
rec = Rectangle(5, 2)
|
||||
Reference in New Issue
Block a user