mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-02 03:40:38 +08:00
grammar
This commit is contained in:
@ -23,7 +23,10 @@ def extend_patch(original_file_str, patch_str, num_lines) -> str:
|
||||
return patch_str
|
||||
|
||||
if type(original_file_str) == bytes:
|
||||
original_file_str = original_file_str.decode('utf-8')
|
||||
try:
|
||||
original_file_str = original_file_str.decode('utf-8')
|
||||
except UnicodeDecodeError:
|
||||
return ""
|
||||
|
||||
original_lines = original_file_str.splitlines()
|
||||
patch_lines = patch_str.splitlines()
|
||||
|
Reference in New Issue
Block a user