Coverage for src/commands/base.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-06-05 22:56 -0700

1""" 

2Base classes for the command system. 

3 

4This module contains shared base classes and utilities used by command handlers. 

5""" 

6 

7from typing import Any 

8 

9 

10class CommandResult: 

11 """Class to represent the result of a command execution.""" 

12 

13 def __init__( 

14 self, 

15 success: bool, 

16 data: Any = None, 

17 message: str | None = None, 

18 error: Exception | None = None, 

19 ): 

20 self.success = success 

21 self.data = data 

22 self.message = message 

23 self.error = error