PrintDebugMessageAction.apply()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
from coalib.results.Result import Result
2
from coalib.results.result_actions.ResultAction import ResultAction
3
4
5
class PrintDebugMessageAction(ResultAction):
6
7
    @staticmethod
8
    def is_applicable(result, original_file_dict, file_diff_dict):
9
        return isinstance(result, Result) and result.debug_msg != ""
10
11
    def apply(self, result, original_file_dict, file_diff_dict):
12
        """
13
        Print the debug message of the result.
14
        """
15
        print(result.debug_msg)
16
17
        return file_diff_dict
18