Coverage for pystratum_cli/application/StratumApplication.py: 100%
16 statements
« prev ^ index » next coverage.py v7.2.7, created at 2024-05-12 12:02 +0200
« prev ^ index » next coverage.py v7.2.7, created at 2024-05-12 12:02 +0200
1from typing import List
3from cleo import Application, Command
5from pystratum_cli.command.ConstantsCommand import ConstantsCommand
6from pystratum_cli.command.RoutineLoaderCommand import RoutineLoaderCommand
7from pystratum_cli.command.RoutineWrapperCommand import RoutineWrapperCommand
8from pystratum_cli.command.StratumCommand import StratumCommand
11class StratumApplication(Application):
12 """
13 The PyStratum application.
14 """
16 # ------------------------------------------------------------------------------------------------------------------
17 def __init__(self):
18 """
19 Object constructor
20 """
21 Application.__init__(self, 'pystratum', '1.0.4')
23 # ------------------------------------------------------------------------------------------------------------------
24 def get_default_commands(self) -> List[Command]:
25 """
26 Returns the default commands of this application.
28 :rtype: list[Command]
29 """
30 commands = Application.get_default_commands(self)
32 self.add(ConstantsCommand())
33 self.add(RoutineLoaderCommand())
34 self.add(StratumCommand())
35 self.add(RoutineWrapperCommand())
37 return commands
39# ----------------------------------------------------------------------------------------------------------------------