Skip to content

fix: check len(errors) before string conversion in udiff_coder.py#5024

Open
Wei-xu293 wants to merge 1 commit intoAider-AI:mainfrom
Wei-xu293:fix/check-before-type-change
Open

fix: check len(errors) before string conversion in udiff_coder.py#5024
Wei-xu293 wants to merge 1 commit intoAider-AI:mainfrom
Wei-xu293:fix/check-before-type-change

Conversation

@Wei-xu293
Copy link
Copy Markdown

Summary

if errors:
errors = "\n\n".join(errors)
if len(errors) < len(uniq):
errors += other_hunks_applied
raise ValueError(errors)

The errors list is converted to string before its length is compared to uniq list.

Verification

  • python -m pytest tests/basic/test_coder.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant