Skip to content

Commit

Permalink
relevant_lines_start > len(file_lines):
Browse files Browse the repository at this point in the history
  • Loading branch information
mrT23 committed Aug 13, 2024
1 parent 26f3bd8 commit 38638bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pr_agent/tools/pr_code_suggestions.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def dedent_code(self, relevant_file, relevant_lines_start, new_code_snippet):
if file.filename.strip() == relevant_file:
if file.head_file:
file_lines = file.head_file.splitlines()
if len(file_lines) >= relevant_lines_start:
if relevant_lines_start > len(file_lines):
get_logger().warning(
"Could not dedent code snippet, because relevant_lines_start is out of range",
artifact={'filename': file.filename,
Expand Down

0 comments on commit 38638bd

Please sign in to comment.