π OpenHands: AI-Driven Development
Disable Python linting by default (fixes #1789) (#1794)
Aleksandar94a9ec76b0d4
diff --git a/opendevin/runtime/plugins/swe_agent_commands/cursors_edit_linting.sh b/opendevin/runtime/plugins/swe_agent_commands/cursors_edit_linting.shindex 82938c07e9..4235f5305d 100644--- a/opendevin/runtime/plugins/swe_agent_commands/cursors_edit_linting.sh+++ b/opendevin/runtime/plugins/swe_agent_commands/cursors_edit_linting.sh@@ -35,8 +35,8 @@ edit() {local new_lines=("${lines[@]:0:$start_line}" "${replacement[@]}" "${lines[@]:$((end_line))}")# Write the new stuff directly back into the original fileprintf "%s\n" "${new_lines[@]}" >| "$CURRENT_FILE"- # Run linter- if [[ $CURRENT_FILE == *.py ]]; then+ # Run linter if enabled+ if [[ $CURRENT_FILE == *.py && -n "$RUN_LINT_AFTER_EDIT" ]]; thenlint_output=$(flake8 --isolated --select=F821,F822,F831,E111,E112,E113,E999,E902 "$CURRENT_FILE" 2>&1)else# do nothingdiff --git a/opendevin/runtime/plugins/swe_agent_commands/edit_linting.sh b/opendevin/runtime/plugins/swe_agent_commands/edit_linting.shindex fdf64ddc26..7dd8d2d0e7 100644--- a/opendevin/runtime/plugins/swe_agent_commands/edit_linting.sh+++ b/opendevin/runtime/plugins/swe_agent_commands/edit_linting.sh@@ -67,8 +67,8 @@ edit() {# Write the new stuff directly back into the original fileprintf "%s\n" "${new_lines[@]}" >| "$CURRENT_FILE"- # Run linter- if [[ $CURRENT_FILE == *.py ]]; then+ # Run linter if enabled+ if [[ $CURRENT_FILE == *.py && -n "$RUN_LINT_AFTER_EDIT" ]]; thenlint_output=$(flake8 --isolated --select=F821,F822,F831,E111,E112,E113,E999,E902 "$CURRENT_FILE" 2>&1)else# do nothing