From 3fc2f055f055cea13ebe531b3fb65c62475c94f1 Mon Sep 17 00:00:00 2001 From: Tobias Wasner Date: Thu, 30 Jan 2025 19:33:50 +0100 Subject: [PATCH] Reformat --- app/pipeline/inconsistency_check_pipeline.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/pipeline/inconsistency_check_pipeline.py b/app/pipeline/inconsistency_check_pipeline.py index d6d7ffa..d92567f 100644 --- a/app/pipeline/inconsistency_check_pipeline.py +++ b/app/pipeline/inconsistency_check_pipeline.py @@ -56,21 +56,27 @@ def __call__(self, dto: InconsistencyCheckPipelineExecutionDTO, **kwargs): overall_response: str = "" - for template_file_path, template_file_content in dto.exercise.template_repository.items(): + for ( + template_file_path, + template_file_content, + ) in dto.exercise.template_repository.items(): template_repository = "\n".join( f"\n{template_file_content}" - ) if template_file_path in dto.exercise.solution_repository.keys(): - solution_file_content = dto.exercise.solution_repository[template_file_path] + solution_file_content = dto.exercise.solution_repository[ + template_file_path + ] solution_repository = f"\n{solution_file_content}" else: solution_repository = "\n".join( f"\n{file_content}" for file_path, file_content in dto.exercise.solution_repository.items() ) - logging.warning(f"Solution file for {template_file_path} not found, using all solution files: {dto.exercise.solution_repository.keys().join(', ')}") + logging.warning( + f"Solution file for {template_file_path} not found, using all solution files: {dto.exercise.solution_repository.keys().join(', ')}" + ) response: str = self.pipeline.invoke( { @@ -80,7 +86,7 @@ def __call__(self, dto: InconsistencyCheckPipelineExecutionDTO, **kwargs): } ) - overall_response += ('\n' if overall_response else '') + response + overall_response += ("\n" if overall_response else "") + response self._append_tokens(self.llm.tokens, PipelineEnum.IRIS_INCONSISTENCY_CHECK) self.callback.done(final_result=overall_response, tokens=self.tokens)