From 2df4bc8b53e49c1f1716d8fdb1931ef1e1ebfbbd Mon Sep 17 00:00:00 2001 From: Tal Date: Sat, 4 Jan 2025 16:28:25 +0200 Subject: [PATCH] Update pr_agent/algo/utils.py Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com> --- pr_agent/algo/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py index e3889568..f7a7d686 100644 --- a/pr_agent/algo/utils.py +++ b/pr_agent/algo/utils.py @@ -588,8 +588,8 @@ def load_large_diff(filename, new_file_content_str: str, original_file_content_s return "" try: - original_file_content_str = original_file_content_str.rstrip() + "\n" - new_file_content_str = new_file_content_str.rstrip() + "\n" + original_file_content_str = (original_file_content_str or "").rstrip() + "\n" + new_file_content_str = (new_file_content_str or "").rstrip() + "\n" diff = difflib.unified_diff(original_file_content_str.splitlines(keepends=True), new_file_content_str.splitlines(keepends=True)) if get_settings().config.verbosity_level >= 2 and show_warning: