Source code for coalib.results.result_actions.PrintAspectAction

from coalib.results.Result import Result
from coalib.results.result_actions.ResultAction import ResultAction

from coala_utils.decorators import enforce_signature


[docs]class PrintAspectAction(ResultAction): @staticmethod @enforce_signature
[docs] def is_applicable(result: Result, original_file_dict, file_diff_dict): if result.aspect is None: return 'There is no aspect associated with the result.' return True
[docs] def apply(self, result, original_file_dict, file_diff_dict): """ Print Aspect Information """ print(type(result.aspect).__qualname__ + '\n' + type(result.aspect).docs.definition) return file_diff_dict