Skip to content

Commit

Permalink
[skip ci] Update plants and fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
mackorone committed Sep 26, 2023
1 parent 94ae1da commit d0e41a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/git_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
import subprocess
from typing import List, Sequence
from typing import List, Tuple

from plants.subprocess_utils import SubprocessUtils

Expand All @@ -12,17 +12,17 @@
class GitUtils:
@classmethod
def any_uncommitted_changes(cls) -> bool:
result = cls._run(["git", "status", "-s"])
result = cls._run(("git", "status", "-s"))
return bool(result.stdout)

@classmethod
def get_last_commit_content(cls) -> List[str]:
"""Get files affected by the most recent commit"""
result = cls._run(["git", "log", "--name-only", "--pretty=format:", "-1"])
result = cls._run(("git", "log", "--name-only", "--pretty=format:", "-1"))
return result.stdout.splitlines()

@classmethod
def _run(cls, args: Sequence[str]) -> "subprocess.CompletedProcess[str]":
def _run(cls, args: Tuple[str, ...]) -> "subprocess.CompletedProcess[str]":
logger.info(f"- Running: {args}")
result = SubprocessUtils.run(args=args)
logger.info(f"- Exited with: {result.returncode}")
Expand Down
2 changes: 1 addition & 1 deletion src/plants
Submodule plants updated 3 files
+24 −2 logging.py
+78 −7 retry.py
+0 −1 subprocess_utils.py

0 comments on commit d0e41a2

Please sign in to comment.