git-copilot-commit 0.1.13__tar.gz → 0.1.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-copilot-commit
3
- Version: 0.1.13
3
+ Version: 0.1.14
4
4
  Summary: Automatically generate and commit changes using copilot
5
5
  Author-email: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com>
6
6
  License-File: LICENSE
@@ -9,7 +9,7 @@ from rich.panel import Panel
9
9
  from rich.table import Table
10
10
  import rich
11
11
 
12
- from pycopilot.copilot import Copilot
12
+ from pycopilot.copilot import Copilot # type: ignore
13
13
  from pycopilot.auth import Authentication
14
14
  from .git import GitRepository, GitError, NotAGitRepositoryError, GitStatus
15
15
  from .settings import Settings
@@ -302,51 +302,3 @@ class GitRepository:
302
302
  commits.append((sha, message))
303
303
 
304
304
  return commits
305
-
306
- def get_current_branch(self) -> str:
307
- """Get the name of the current branch."""
308
- result = self._run_git_command(["rev-parse", "--abbrev-ref", "HEAD"])
309
- return result.stdout.strip()
310
-
311
- def has_changes(self) -> bool:
312
- """Check if there are any changes (staged, unstaged, or untracked)."""
313
- status = self.get_status()
314
- return (
315
- status.has_staged_changes
316
- or status.has_unstaged_changes
317
- or status.has_untracked_files
318
- )
319
-
320
- def get_diff(self, staged: bool = False, paths: list[str] | None = None) -> str:
321
- """
322
- Get diff output.
323
-
324
- Args:
325
- staged: Whether to get staged diff (--staged flag).
326
- paths: Specific paths to diff.
327
-
328
- Returns:
329
- Diff output as string.
330
- """
331
- args = ["diff"]
332
- if staged:
333
- args.append("--staged")
334
- if paths:
335
- args.extend(["--"] + paths)
336
-
337
- result = self._run_git_command(args)
338
- return result.stdout
339
-
340
- def get_file_content(self, path: str, revision: str = "HEAD") -> str:
341
- """
342
- Get content of a file at a specific revision.
343
-
344
- Args:
345
- path: File path.
346
- revision: Git revision (default: HEAD).
347
-
348
- Returns:
349
- File content as string.
350
- """
351
- result = self._run_git_command(["show", f"{revision}:{path}"])
352
- return result.stdout