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:
Paul Gauthier 2023-05-08 22:59:55 -07:00
parent c6d369742a
commit 3cce28d27d

View file

@ -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