mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
73303b1c08
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.
30 lines
838 B
Python
30 lines
838 B
Python
from mock.mock_app.routers import work_router
|
|
|
|
from argenta import App, Orchestrator
|
|
from argenta.app import PredefinedMessages, DynamicDividingLine, AutoCompleter
|
|
from argenta.orchestrator import ArgParser
|
|
from argenta.orchestrator.argparser import BooleanArgument
|
|
|
|
|
|
arg_parser = ArgParser(processed_args=[BooleanArgument("repeat")])
|
|
app: App = App(
|
|
dividing_line=DynamicDividingLine(),
|
|
autocompleter=AutoCompleter(),
|
|
)
|
|
orchestrator: Orchestrator = Orchestrator(arg_parser)
|
|
|
|
|
|
def main():
|
|
app.include_router(work_router)
|
|
print(f"\n\n{orchestrator.get_input_args()}")
|
|
|
|
app.add_message_on_startup(PredefinedMessages.USAGE)
|
|
app.add_message_on_startup(PredefinedMessages.AUTOCOMPLETE)
|
|
app.add_message_on_startup(PredefinedMessages.HELP)
|
|
|
|
orchestrator.start_polling(app)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|