PrintDebugMessageAction   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A apply() 0 7 1
A is_applicable() 0 3 1
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