From 8240d8f3435330529fbdf6a0e5b4c60f50e5a044 Mon Sep 17 00:00:00 2001 From: Ian Hoang Date: Fri, 26 Jan 2024 09:48:27 -0600 Subject: [PATCH] Fix pylint errors Signed-off-by: Ian Hoang --- osbenchmark/workload/loader.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osbenchmark/workload/loader.py b/osbenchmark/workload/loader.py index f9fe31c86..e7acee5ab 100644 --- a/osbenchmark/workload/loader.py +++ b/osbenchmark/workload/loader.py @@ -1022,7 +1022,7 @@ def read(self, workload_name, workload_spec_file, mapping_dir): msg += " Lines containing the error:\n\n{}\n\n".format("\n".join(erroneous_lines)) msg += "The complete workload has been written to '{}' for diagnosis. \n\n".format(tmp.name) console_message = f"Suggestion: Verify that [{workload_name}] workload has correctly formatted JSON files and " + \ - f"Jinja Templates. For Jinja2 errors, consider using a live Jinja2 parser. " + \ + "Jinja Templates. For Jinja2 errors, consider using a live Jinja2 parser. " + \ f"See common workload formatting errors:{WorkloadFileReader.COMMON_WORKLOAD_FORMAT_ERRORS}" msg += console_message raise WorkloadSyntaxError(msg) @@ -1030,9 +1030,10 @@ def read(self, workload_name, workload_spec_file, mapping_dir): except Exception as e: # TypeErrors get logged here self.logger.exception("Could not load [%s].", workload_spec_file) - msg = "Could not load '{}'. The complete workload has been written to '{}' for diagnosis. \n\n".format(workload_spec_file, tmp.name) + msg = "Could not load '{}'. The complete workload has been written to '{}' for diagnosis. \n\n".format( + workload_spec_file, tmp.name) console_message = f"Suggestion: Verify that [{workload_name}] workload has correctly formatted JSON files and " + \ - f"Jinja Templates. For Jinja2 errors, consider using a live Jinja2 parser. " + \ + "Jinja Templates. For Jinja2 errors, consider using a live Jinja2 parser. " + \ f"See common workload formatting errors:{WorkloadFileReader.COMMON_WORKLOAD_FORMAT_ERRORS}" msg += console_message # Convert to string early on to avoid serialization errors with Jinja exceptions.