Failed Conditions
Pull Request — master (#1127)
by Mischa
01:56
created

coalib.results.result_actions.Result   A

Complexity

Total Complexity 22

Size/Duplication

Total Lines 176
Duplicated Lines 0 %
Metric Value
dl 0
loc 176
rs 10
wmc 22

6 Methods

Rating   Name   Duplication   Size   Complexity  
B to_ignore() 0 17 6
A apply() 0 11 2
B from_values() 0 43 1
B to_string_dict() 0 32 5
B __init__() 0 34 3
B __add__() 0 16 5
1
from coalib.results.result_actions.ResultAction import ResultAction
2
from coalib.results.Result import Result
3
4
5
class PrintDebugMessageAction(ResultAction):
6
    @staticmethod
7
    def is_applicable(result, original_file_dict, file_diff_dict):
8
        return isinstance(result, Result) and result.debug_msg != ""
9
10
    def apply(self, result, original_file_dict, file_diff_dict):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
        """
12
        Print the debug message of the result.
13
        """
14
        print(result.debug_msg)
15
16
        return file_diff_dict
17