-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: handle newline issues in patch generation #1439
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com>
/describe |
/improve |
PR Code Suggestions ✨Latest suggestions up to 793f76f
Previous suggestions✅ Suggestions up to commit e431979
|
/help Config question! in .pragent.toml, are these settings hierarchical as overrides or is there inheritance (as in they merge together down to the root?). I can try this wknd but figured I'd ask if someone has the answer 🙂
|
Question:Config question! in .pragent.toml, are these settings hierarchical as overrides or is there inheritance (as in they merge together down to the root?). I can try this wknd but figured I'd ask if someone has the answer 🙂 use_wiki_settings_file=true use_repo_settings_file=true use_global_settings_file=true configuration.toml Answer:According to the documentation, the configuration settings in Qodo Merge follow a hierarchical override pattern, where:
This is explicitly stated in the documentation: "In terms of precedence, wiki configurations will override local configurations, and local configurations will override global configurations." The three configuration file types are:
Note that you should only edit the configurations you need to change, rather than copying the entire configuration options, to avoid legacy problems when something changes. Relevant Sources:
|
User description
addresses #1438
PR Type
Bug fix, Tests
Description
Fixed newline handling in
load_large_diff
to prevent incorrect patch generation.Added tests for scenarios with missing newlines and empty inputs in
load_large_diff
.Updated test cases to include trailing newline in expected patch strings.
Introduced a new test class
TestLoadLargeDiff
for targeted patch generation testing.Changes walkthrough 📝
utils.py
Fix newline handling in `load_large_diff` function
pr_agent/algo/utils.py
newlines.
test_bitbucket_provider.py
Update test cases for trailing newline handling
tests/unittest/test_bitbucket_provider.py
test_extend_patch.py
Add tests for `load_large_diff` function
tests/unittest/test_extend_patch.py
TestLoadLargeDiff
class for patch generation tests.