From f9c498d03870f7a537c0f6f32bfe85bc51f74b59 Mon Sep 17 00:00:00 2001 From: Adarsh Date: Tue, 11 Dec 2018 09:03:54 -0700 Subject: [PATCH] Renamed outputFiles to outputDict --- .../autoTranslate/scripts/translate.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/delphi/program_analysis/autoTranslate/scripts/translate.py b/delphi/program_analysis/autoTranslate/scripts/translate.py index 6b0c27ebd..9d9675fc9 100755 --- a/delphi/program_analysis/autoTranslate/scripts/translate.py +++ b/delphi/program_analysis/autoTranslate/scripts/translate.py @@ -366,7 +366,7 @@ def loadFunction(self, root): def analyze( self, trees: List[ET.ElementTree], comments: OrderedDict ) -> Dict: - outputFiles = {} + outputDict = {} ast = [] # Parse through the ast once to identify and grab all the funcstions @@ -401,10 +401,10 @@ def analyze( # Load the functions list and Fortran ast to a single data structure which # can be pickled and hence is portable across various scripts and usages. - outputFiles["ast"] = ast - outputFiles["functionList"] = self.functionList - outputFiles["comments"] = comments - return outputFiles + outputDict["ast"] = ast + outputDict["functionList"] = self.functionList + outputDict["comments"] = comments + return outputDict def get_trees(files: List[str]) -> List[ET.ElementTree]: @@ -437,7 +437,7 @@ def get_trees(files: List[str]) -> List[ET.ElementTree]: trees = get_trees(args.files) comments = get_comments(fortranFile) translator = XMLToJSONTranslator() - outputFiles = translator.analyze(trees, comments) + outputDict = translator.analyze(trees, comments) with open(pickleFile, "wb") as f: - pickle.dump(outputFiles, f) + pickle.dump(outputDict, f)