mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
ref: typehints, enum instead of raw string, abc and other (#1)
Full code coverage with annotations, fixing errors in various linters: ruff, wps, etc. Fixing errors in type checkers: ty, mypy, pyright. Formatting and bringing code to a consistent style, applying best practices in various aspects.
This commit is contained in:
+4
-17
@@ -1,18 +1,5 @@
|
||||
from argenta.app import App
|
||||
from argenta.command import Command
|
||||
from argenta.orchestrator import Orchestrator
|
||||
from argenta.router import Router
|
||||
import argparse
|
||||
|
||||
|
||||
router = Router()
|
||||
orchestrator = Orchestrator()
|
||||
|
||||
@router.command(Command('test'))
|
||||
def test(response):
|
||||
print('test command')
|
||||
|
||||
app = App(ignore_command_register=True,
|
||||
override_system_messages=True,
|
||||
print_func=print)
|
||||
app.include_router(router)
|
||||
orchestrator.start_polling(app)
|
||||
parser = argparse.ArgumentParser(prog='myprogram')
|
||||
_ = parser.add_argument('--foo', help='foo of the %(prog)s program')
|
||||
parser.print_help()
|
||||
Reference in New Issue
Block a user