Fix some lint warnings (#189)

Remove unused imports or variable, and apply suggestions from https://adamj.eu/tech/2019/09/12/how-i-import-pythons-datetime-module/.
This commit is contained in:
Hugo van Kemenade
2023-11-26 14:25:04 +02:00
committed by GitHub
parent f59390815c
commit 1022d8f816
5 changed files with 5 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
from hashlib import sha1
from pathlib import Path
from subprocess import run, PIPE
from subprocess import run
class Git:
@@ -18,7 +18,7 @@ class Git:
child = run(f"git {cmd}", capture_output=True, timeout=300, check=True, shell=True, cwd=self.repo_dir)
return child.stdout.decode("utf-8").strip().split("\n")
except ChildProcessError as ex:
raise RuntimeError(f"Failed to run '{git_command}': {ex}")
raise RuntimeError(f"Failed to run '{cmd}': {ex}")
def setup(self, bare: bool = False):
"""Creates the repository path and runs: