From 707724e0eaeb8ad2a6a1bfd13185c0d3f188026b Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Wed, 4 Jun 2025 09:56:34 +0545 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(git.py):=20remove?= =?UTF-8?q?=20unused=20variable=20in=20=5Frun\=5Fgit\=5Fcommand=20calls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devtools/shared/git.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/devtools/shared/git.py b/devtools/shared/git.py index 9e04321..4410d36 100644 --- a/devtools/shared/git.py +++ b/devtools/shared/git.py @@ -47,12 +47,12 @@ class GitService: def get_staged_files(self) -> List[str]: """Get list of staged files.""" - stdout, _ = self._run_git_command(["diff", "--cached", "--name-only"]) + stdout, _, _ = self._run_git_command(["diff", "--cached", "--name-only"]) return stdout.splitlines() if stdout else [] def get_unstaged_files(self) -> List[str]: """Get list of unstaged files.""" - stdout, _ = self._run_git_command( + stdout, _, _ = self._run_git_command( ["ls-files", "--modified", "--others", "--exclude-standard"] ) return stdout.splitlines() if stdout else [] @@ -62,7 +62,7 @@ class GitService: args = ["diff", "--cached" if staged else ""] if file_path: args.append(file_path) - stdout, _ = self._run_git_command(args) + stdout, _, _ = self._run_git_command(args) return stdout def get_all_diffs(self, staged: bool = True) -> Dict[str, str]: @@ -76,17 +76,17 @@ class GitService: if sign: args.append("-S") args.extend(["-m", message]) - stdout, stderr = self._run_git_command(args) + stdout, stderr, _ = self._run_git_command(args) return not stderr def get_repo_name(self) -> str: """Get the repository name.""" - stdout, _ = self._run_git_command(["rev-parse", "--show-toplevel"]) + stdout, _, _ = self._run_git_command(["rev-parse", "--show-toplevel"]) return Path(stdout).name def get_current_branch(self) -> str: """Get the current branch name.""" - stdout, _ = self._run_git_command(["rev-parse", "--abbrev-ref", "HEAD"]) + stdout, _, _ = self._run_git_command(["rev-parse", "--abbrev-ref", "HEAD"]) return stdout def push(self, branch: Optional[str] = None) -> bool: @@ -166,7 +166,7 @@ class GitService: if limit: args.append(f"-n {limit}") - stdout, _ = self._run_git_command(args) + stdout, _, _ = self._run_git_command(args) commits = [] current_commit = []