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

1from typing import List 

2 

3from cleo import Application, Command 

4 

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 

9 

10 

11class StratumApplication(Application): 

12 """ 

13 The PyStratum application. 

14 """ 

15 

16 # ------------------------------------------------------------------------------------------------------------------ 

17 def __init__(self): 

18 """ 

19 Object constructor 

20 """ 

21 Application.__init__(self, 'pystratum', '1.0.4') 

22 

23 # ------------------------------------------------------------------------------------------------------------------ 

24 def get_default_commands(self) -> List[Command]: 

25 """ 

26 Returns the default commands of this application. 

27 

28 :rtype: list[Command] 

29 """ 

30 commands = Application.get_default_commands(self) 

31 

32 self.add(ConstantsCommand()) 

33 self.add(RoutineLoaderCommand()) 

34 self.add(StratumCommand()) 

35 self.add(RoutineWrapperCommand()) 

36 

37 return commands 

38 

39# ----------------------------------------------------------------------------------------------------------------------