diff --git a/src/python/review/inspectors/flake8/.flake8 b/src/python/review/inspectors/flake8/.flake8 index 2ad4f70f..19edebba 100644 --- a/src/python/review/inspectors/flake8/.flake8 +++ b/src/python/review/inspectors/flake8/.flake8 @@ -41,6 +41,7 @@ ignore=W291, # trailing whitespaces WPS431, # Forbid nested classes. WPS435, # Forbid multiplying lists. # WPS: Refactoring + WPS518, # Forbid implicit enumerate() calls. TODO: Collision with "C0200" WPS527, # Require tuples as arguments for frozenset. # WPS: OOP WPS602, # Forbid @staticmethod decorator. diff --git a/src/python/review/inspectors/radon/radon.py b/src/python/review/inspectors/radon/radon.py index f6a2236d..79223164 100644 --- a/src/python/review/inspectors/radon/radon.py +++ b/src/python/review/inspectors/radon/radon.py @@ -10,6 +10,9 @@ from src.python.review.inspectors.tips import get_maintainability_index_tip +MAINTAINABILITY_ORIGIN_CLASS = "RAD100" + + class RadonInspector(BaseInspector): inspector_type = InspectorType.RADON @@ -41,7 +44,9 @@ def mi_parse(cls, mi_output: str) -> List[BaseIssue]: file_path = Path(groups[0]) maintainability_lack = convert_percentage_of_value_to_lack_of_value(float(groups[1])) - issue_data = IssueData.get_base_issue_data_dict(file_path, cls.inspector_type) + issue_data = IssueData.get_base_issue_data_dict( + file_path, cls.inspector_type, origin_class=MAINTAINABILITY_ORIGIN_CLASS, + ) issue_data[IssueData.DESCRIPTION.value] = get_maintainability_index_tip() issue_data[IssueData.MAINTAINABILITY_LACK.value] = maintainability_lack issue_data[IssueData.ISSUE_TYPE.value] = IssueType.MAINTAINABILITY