Skip to content

Commit db3c671

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 327881c commit db3c671

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/source/conf.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,23 @@
115115
import os
116116
import subprocess
117117

118+
118119
def get_git_branch():
119120
try:
120121
# Check if running on ReadTheDocs
121122
if os.environ.get("READTHEDOCS") == "True":
122123
return os.environ.get("READTHEDOCS_GIT_IDENTIFIER", "master")
123-
124+
124125
# Otherwise, get the current branch from git locally
125-
return subprocess.check_output(
126-
["git", "rev-parse", "--abbrev-ref", "HEAD"]
127-
).decode("utf-8").strip()
126+
return (
127+
subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"])
128+
.decode("utf-8")
129+
.strip()
130+
)
128131
except Exception:
129132
return "master"
130133

134+
131135
current_branch = get_git_branch()
132136

133137
html_theme_options = {

0 commit comments

Comments
 (0)