mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
Removed unused variable commit_result
in coder.py
.
# Context: USER: coder.py:567:9: F841 local variable 'commit_result' is assigned to but never used ASSISTANT: I see that the variable `commit_result` is assigned but never used. I will remove the assignment to fix the issue. ```python coder.py <<<<<<< ORIGINAL commit_result = repo.git.commit("-m", full_commit_message, "--no-verify") commit_hash = repo.head.commit.hexsha[:7] self.console.print(f"[green bold]{commit_hash} {commit_message}") ======= repo.git.commit("-m", full_commit_message, "--no-verify") commit_hash = repo.head.commit.hexsha[:7] self.console.print(f"[green bold]{commit_hash} {commit_message}") >>>>>>> UPDATED ```
This commit is contained in:
parent
c6d369742a
commit
3cce28d27d
1 changed files with 2 additions and 2 deletions
4
coder.py
4
coder.py
|
@ -103,7 +103,7 @@ class Coder:
|
||||||
self.console.print(
|
self.console.print(
|
||||||
f"[red bold]Added {relative_fname} to the git repo"
|
f"[red bold]Added {relative_fname} to the git repo"
|
||||||
)
|
)
|
||||||
commit_message = f"Initial commit: Added new files to the git repo."
|
commit_message = "Initial commit: Added new files to the git repo."
|
||||||
repo.git.commit("-m", commit_message, "--no-verify")
|
repo.git.commit("-m", commit_message, "--no-verify")
|
||||||
self.console.print(
|
self.console.print(
|
||||||
f"[green bold]Committed new files with message: {commit_message}"
|
f"[green bold]Committed new files with message: {commit_message}"
|
||||||
|
@ -564,7 +564,7 @@ class Coder:
|
||||||
repo.git.add(*relative_dirty_fnames)
|
repo.git.add(*relative_dirty_fnames)
|
||||||
|
|
||||||
full_commit_message = commit_message + "\n\n" + context
|
full_commit_message = commit_message + "\n\n" + context
|
||||||
commit_result = repo.git.commit("-m", full_commit_message, "--no-verify")
|
repo.git.commit("-m", full_commit_message, "--no-verify")
|
||||||
commit_hash = repo.head.commit.hexsha[:7]
|
commit_hash = repo.head.commit.hexsha[:7]
|
||||||
self.console.print(f"[green bold]{commit_hash} {commit_message}")
|
self.console.print(f"[green bold]{commit_hash} {commit_message}")
|
||||||
return commit_hash, commit_message
|
return commit_hash, commit_message
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue