mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
some fix
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
from argenta.app.autocompleter import AutoCompleter
|
||||
|
||||
# Argenta
|
||||
|
||||
---
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
class InvalidRouterInstanceException(Exception):
|
||||
def __str__(self):
|
||||
return "Invalid Router Instance"
|
||||
|
||||
|
||||
class NoRegisteredRoutersException(Exception):
|
||||
def __str__(self):
|
||||
return "No Registered Router Found"
|
||||
|
||||
@@ -15,8 +15,7 @@ from argenta.command.exceptions import (UnprocessedInputFlagException,
|
||||
RepeatedInputFlagsException,
|
||||
EmptyInputCommandException,
|
||||
BaseInputCommandException)
|
||||
from argenta.app.exceptions import (InvalidRouterInstanceException,
|
||||
NoRegisteredRoutersException,
|
||||
from argenta.app.exceptions import (NoRegisteredRoutersException,
|
||||
NoRegisteredHandlersException)
|
||||
from argenta.app.registered_routers.entity import RegisteredRouters
|
||||
|
||||
@@ -201,6 +200,7 @@ class AppSetups(AppValidators, AppPrinters):
|
||||
|
||||
for message in self._messages_on_startup:
|
||||
self._print_func(message)
|
||||
print('\n\n')
|
||||
|
||||
if not self._repeat_command_groups_description:
|
||||
self._print_command_group_description()
|
||||
@@ -253,9 +253,6 @@ class App(AppSetters, AppNonStandardHandlers, AppSetups):
|
||||
|
||||
|
||||
def include_router(self, router: Router) -> None:
|
||||
if not isinstance(router, Router):
|
||||
raise InvalidRouterInstanceException()
|
||||
|
||||
router.set_ignore_command_register(self._ignore_command_register)
|
||||
self._registered_routers.add_registered_router(router)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ def main():
|
||||
|
||||
app.add_message_on_startup(PredeterminedMessages.USAGE)
|
||||
app.add_message_on_startup(PredeterminedMessages.AUTOCOMPLETE)
|
||||
app.add_message_on_startup(PredeterminedMessages.HELP + '\n\n')
|
||||
app.add_message_on_startup(PredeterminedMessages.HELP)
|
||||
|
||||
app.start_polling()
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "argenta"
|
||||
version = "0.5.0-beta"
|
||||
version = "0.5.0-beta2"
|
||||
description = "Python library for creating TUI"
|
||||
authors = [
|
||||
{name = "kolo", email = "kolo.is.main@gmail.com"}
|
||||
|
||||
Reference in New Issue
Block a user