mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
ruff format
This commit is contained in:
@@ -5,6 +5,8 @@ console = Console()
|
||||
|
||||
|
||||
def help_command():
|
||||
console.print("[italic bold]The main functionality of the script is to convert an expression from a string "
|
||||
"to a mathematical one and then calculate this expression. "
|
||||
"Project GitHub: https://github.com/koloideal/WordMath[/italic bold]")
|
||||
console.print(
|
||||
"[italic bold]The main functionality of the script is to convert an expression from a string "
|
||||
"to a mathematical one and then calculate this expression. "
|
||||
"Project GitHub: https://github.com/koloideal/WordMath[/italic bold]"
|
||||
)
|
||||
|
||||
@@ -7,12 +7,19 @@ from argenta.response import Response
|
||||
from argenta.router import Router
|
||||
|
||||
|
||||
work_router: Router = Router(title='Work points:')
|
||||
work_router: Router = Router(title="Work points:")
|
||||
|
||||
console = Console()
|
||||
|
||||
|
||||
@work_router.command(Command('get', 'Get Help', aliases=['help', 'Get_help'], flags=Flags(PredefinedFlags.PORT, PredefinedFlags.HOST)))
|
||||
@work_router.command(
|
||||
Command(
|
||||
"get",
|
||||
"Get Help",
|
||||
aliases=["help", "Get_help"],
|
||||
flags=Flags(PredefinedFlags.PORT, PredefinedFlags.HOST),
|
||||
)
|
||||
)
|
||||
def command_help(response: Response):
|
||||
print(response.status)
|
||||
print(response.undefined_flags.get_flags())
|
||||
@@ -20,12 +27,9 @@ def command_help(response: Response):
|
||||
print(response.invalid_value_flags.get_flags())
|
||||
|
||||
|
||||
@work_router.command('run')
|
||||
@work_router.command("run")
|
||||
def command_start_solving(response: Response):
|
||||
print(response.status)
|
||||
print(response.undefined_flags.get_flags())
|
||||
print(response.valid_flags.get_flags())
|
||||
print(response.invalid_value_flags.get_flags())
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,10 +9,12 @@ from argenta.orchestrator.argparser import ArgParser
|
||||
from argenta.orchestrator.argparser.arguments import BooleanArgument
|
||||
|
||||
|
||||
arg_parser = ArgParser(processed_args=[BooleanArgument('repeat')])
|
||||
app: App = App(dividing_line=DynamicDividingLine(),
|
||||
autocompleter=AutoCompleter(),
|
||||
repeat_command_groups=False,)
|
||||
arg_parser = ArgParser(processed_args=[BooleanArgument("repeat")])
|
||||
app: App = App(
|
||||
dividing_line=DynamicDividingLine(),
|
||||
autocompleter=AutoCompleter(),
|
||||
repeat_command_groups=False,
|
||||
)
|
||||
orchestrator: Orchestrator = Orchestrator(arg_parser)
|
||||
|
||||
|
||||
@@ -25,5 +27,6 @@ def main():
|
||||
|
||||
orchestrator.start_polling(app)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user