Update environment.py
Browse files- environment.py +2 -1
environment.py
CHANGED
|
@@ -498,7 +498,7 @@ class CodeReviewEnv:
|
|
| 498 |
lint_results=self._lint_results,
|
| 499 |
doc_results=self._doc_results,
|
| 500 |
proposed_fix=None,
|
| 501 |
-
original_code=
|
| 502 |
)
|
| 503 |
|
| 504 |
self._comments.append(f"Author: {response}")
|
|
@@ -513,6 +513,7 @@ class CodeReviewEnv:
|
|
| 513 |
base_reward = -0.05
|
| 514 |
self._done = True
|
| 515 |
else:
|
|
|
|
| 516 |
self._current_code = action.fix_code
|
| 517 |
|
| 518 |
runner = TestRunner(self._current_bug_id)
|
|
|
|
| 498 |
lint_results=self._lint_results,
|
| 499 |
doc_results=self._doc_results,
|
| 500 |
proposed_fix=None,
|
| 501 |
+
original_code=original_buggy
|
| 502 |
)
|
| 503 |
|
| 504 |
self._comments.append(f"Author: {response}")
|
|
|
|
| 513 |
base_reward = -0.05
|
| 514 |
self._done = True
|
| 515 |
else:
|
| 516 |
+
original_buggy = self._current_code
|
| 517 |
self._current_code = action.fix_code
|
| 518 |
|
| 519 |
runner = TestRunner(self._current_bug_id)
|