From 3cce28d27d26adabde621fb1792a450b144f39dd Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 8 May 2023 22:59:55 -0700 Subject: [PATCH] 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 ``` --- coder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coder.py b/coder.py index e2e2ab156..3725fac75 100755 --- a/coder.py +++ b/coder.py @@ -103,7 +103,7 @@ class Coder: self.console.print( 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") self.console.print( f"[green bold]Committed new files with message: {commit_message}" @@ -564,7 +564,7 @@ class Coder: repo.git.add(*relative_dirty_fnames) 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] self.console.print(f"[green bold]{commit_hash} {commit_message}") return commit_hash, commit_message