aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/fatcat_web/__init__.py2
-rw-r--r--python/fatcat_web/web_config.py9
2 files changed, 6 insertions, 5 deletions
diff --git a/python/fatcat_web/__init__.py b/python/fatcat_web/__init__.py
index a89c5bbe..c4b6309b 100644
--- a/python/fatcat_web/__init__.py
+++ b/python/fatcat_web/__init__.py
@@ -3,6 +3,7 @@ from typing import Any
import elasticsearch
import fatcat_openapi_client
+import sentry_sdk
from authlib.flask.client import OAuth
from flask import Flask
from flask.logging import create_logger
@@ -13,7 +14,6 @@ from flask_mwoauth import MWOAuth
from flask_uuid import FlaskUUID
from flask_wtf.csrf import CSRFProtect
from loginpass import GitHub, Gitlab, ORCiD, create_flask_blueprint
-import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from fatcat_web.types import AnyResponse
diff --git a/python/fatcat_web/web_config.py b/python/fatcat_web/web_config.py
index 005986bd..55d233f3 100644
--- a/python/fatcat_web/web_config.py
+++ b/python/fatcat_web/web_config.py
@@ -42,14 +42,15 @@ def test_bool_str() -> None:
assert bool_str("True") is True
assert bool_str("FALSE") is False
+
def fetch_git_sha():
"""
Get short commit id, runnable anywhere within a git repository.
"""
- return subprocess.check_output(['git',
- 'rev-parse',
- '--short',
- 'HEAD']).decode('ascii').strip()
+ return (
+ subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).decode("ascii").strip()
+ )
+
class Config(object):
GIT_REVISION = (