Coverage for src/probable_fiesta/command/builder/command_factory.py: 82%

11 statements  

« prev     ^ index     » next       coverage.py v7.1.0, created at 2023-01-30 18:57 -0500

1"""Command Factory class.""" 

2from .command import Command 

3 

4class CommandFactory: 

5 @staticmethod 

6 def new_command_without_args(name, function, args=None): 

7 return Command(name, function, *args) 

8 

9 @staticmethod 

10 def new_command(name, function, *args): 

11 return Command.Factory.new_command(name, function, *args) 

12 

13 @staticmethod 

14 def new_command_empty(): 

15 return Command(None, None, None)