mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-05 05:37:50 +02:00
Run black on py
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from ram.utils import git_suffix
|
||||
|
||||
__version__ = '0.0.1'
|
||||
__version__ = "0.0.1"
|
||||
__version__ += git_suffix(__file__)
|
||||
|
@@ -152,10 +152,7 @@ DECODER_INTERFACES = [
|
||||
(5, "Next18/Next18S"),
|
||||
]
|
||||
|
||||
MANUFACTURER_TYPES = [
|
||||
("model", "Model"),
|
||||
("real", "Real")
|
||||
]
|
||||
MANUFACTURER_TYPES = [("model", "Model"), ("real", "Real")]
|
||||
|
||||
ROLLING_STOCK_TYPES = [
|
||||
("engine", "Engine"),
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user