From f4464bf18a0055a27f40e1ab3b7e14d9c60d8326 Mon Sep 17 00:00:00 2001 From: Leonie von Mann Date: Wed, 5 Jun 2024 10:48:39 +0200 Subject: [PATCH] Fix linting issues --- .../varats/experiments/vara/blame_ast_experiment.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/varats/varats/experiments/vara/blame_ast_experiment.py b/varats/varats/experiments/vara/blame_ast_experiment.py index 4955411f6..dc6e471c4 100644 --- a/varats/varats/experiments/vara/blame_ast_experiment.py +++ b/varats/varats/experiments/vara/blame_ast_experiment.py @@ -127,12 +127,18 @@ def analyze(self) -> actions.StepResult: for binary in self.project.binaries: varats_result_folder = get_varats_result_folder(self.project) + line_filepath = None + ast_filepath = None + for file in os.listdir(varats_result_folder): if fnmatch.fnmatch(file, "LBA" + '*'): line_filepath = Path(varats_result_folder / file) if fnmatch.fnmatch(file, "ASTBA" + '*'): ast_filepath = Path(varats_result_folder / file) + if not line_filepath or not ast_filepath: + return actions.StepResult.ERROR + line_annotations = BA(line_filepath) ast_annotations = BA(ast_filepath) @@ -255,6 +261,13 @@ class BlameASTExperiment(VersionExperiment, shorthand="BASTE"): def actions_for_project( self, project: VProject ) -> tp.MutableSequence[actions.Step]: + """ + Returns the specified steps to run the project(s) specified in the call + in a fixed order. + + Args: + project: to analyze + """ # Generate AST blame report (comparison) analysis_actions: tp.MutableSequence[actions.Step] = [