Add some typing

This commit is contained in:
Ayaz Salikhov
2021-05-03 00:54:52 +03:00
parent 7d7bbba09f
commit 2172a9ab16
7 changed files with 40 additions and 30 deletions

View File

@@ -6,15 +6,15 @@ from plumbum.cmd import git
class GitHelper:
@staticmethod
def commit_hash():
def commit_hash() -> str:
return git["rev-parse", "HEAD"]().strip()
@staticmethod
def commit_hash_tag():
def commit_hash_tag() -> str:
return GitHelper.commit_hash()[:12]
@staticmethod
def commit_message():
def commit_message() -> str:
return git["log", -1, "--pretty=%B"]().strip()