Completed
Pull Request — master (#2081)
by Abdeali
02:15
created

PrintMoreInfoAction.is_applicable()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
1
from coalib.results.Result import Result
2
from coalib.results.result_actions.ResultAction import ResultAction
3
4
5
class PrintMoreInfoAction(ResultAction):
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable ResultAction does not seem to be defined.
Loading history...
6
7
    @staticmethod
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable staticmethod does not seem to be defined.
Loading history...
8
    def is_applicable(result, original_file_dict, file_diff_dict):
9
        return isinstance(result, Result) and result.additional_info != ""
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable result does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable Result does not seem to be defined.
Loading history...
10
11
    def apply(self, result, original_file_dict, file_diff_dict):
12
        """
13
        Print additional information given by the result.
14
        """
15
        print(result.additional_info)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable result does not seem to be defined.
Loading history...
16
17
        return file_diff_dict
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable file_diff_dict does not seem to be defined.
Loading history...
18