Sweep: Refactor edit_sweep_comment
function in on_ticket.py
to remove nonlocal
usage
#4026
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request refactors the
edit_sweep_comment
function in theon_ticket.py
file to remove the use ofnonlocal
variables. Instead, all necessary variables are passed as arguments to the function.Description
The main changes in this pull request are:
edit_sweep_comment
function now takes additional arguments:current_index
,user_token
,g
,repo
,issue_comment
,initial_sandbox_response
, andinitial_sandbox_response_file
.nonlocal
usage has been removed from theedit_sweep_comment
function, and all necessary variables are now passed as arguments.edit_sweep_comment
have been updated to include the new arguments.Summary
edit_sweep_comment
function insweepai/handlers/on_ticket.py
to removenonlocal
usageedit_sweep_comment
function to pass all necessary variablesedit_sweep_comment
to include the new argumentsFixes #3672.
Tip
To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.