From 2b1e841ef15b5b88673ddff1d0487fe992cfb81d Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 10 Dec 2023 19:45:54 +0200 Subject: [PATCH] s --- pr_agent/algo/utils.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py index c68e7f6f..8b2f21d7 100644 --- a/pr_agent/algo/utils.py +++ b/pr_agent/algo/utils.py @@ -80,7 +80,7 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool=True) -> str: return markdown_text -def parse_code_suggestion(code_suggestions: dict, i:int, gfm_supported: bool=True) -> str: +def parse_code_suggestion(code_suggestions: dict, i: int = 0, gfm_supported: bool = True) -> str: """ Convert a dictionary of data into markdown format. @@ -91,12 +91,10 @@ def parse_code_suggestion(code_suggestions: dict, i:int, gfm_supported: bool=Tru str: A string containing the markdown formatted text generated from the input dictionary. """ markdown_text = "" - if i == 0: - markdown_text += "
" if gfm_supported and 'relevant line' in code_suggestions: - # markdown_text=markdown_text.strip() + if i == 0: + markdown_text += "
" markdown_text += '' - relevant_file = '' for sub_key, sub_value in code_suggestions.items(): try: if sub_key.lower() == 'relevant file':