Run black on py

This commit is contained in:
2022-04-19 14:25:29 +02:00
parent 13cc531c5d
commit b925af1e7a
13 changed files with 95 additions and 86 deletions

View File

@@ -11,13 +11,14 @@ def git_suffix(fname):
"""
try:
gh = subprocess.check_output(
['git', 'rev-parse', '--short', 'HEAD'],
stderr=open(os.devnull, 'w')).strip()
gh = "-git" + gh.decode() if gh else ''
["git", "rev-parse", "--short", "HEAD"],
stderr=open(os.devnull, "w"),
).strip()
gh = "-git" + gh.decode() if gh else ""
except Exception:
# trapping everything on purpose; git may not be installed or it
# may not work properly
gh = ''
gh = ""
return gh