Skip to content

Commit 65ce22f

Browse files
[pre-commit.ci] auto fixes from pre-commit hooks
1 parent 3c1cc36 commit 65ce22f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
import time
1818
from importlib.metadata import version
1919
from pathlib import Path
20+
2021
import requests
22+
2123
# If extensions (or modules to document with autodoc) are in another directory,
2224
# add these directories to sys.path here. If the directory is relative to the
2325
# documentation root, use Path().resolve() to make it absolute, like shown here.
@@ -68,8 +70,10 @@
6870
# |version| and |release|, also used in various other places throughout the
6971
# built documents.
7072

73+
7174
def _get_latest_release_from_github(org: str, repo_name: str) -> str:
72-
"""Get the highest version release (including prereleases) from GitHub repository."""
75+
"""Get the highest version release (including prereleases) from GitHub
76+
repository."""
7377
url = f"https://api.github.com/repos/{org}/{repo_name}/releases"
7478
response = requests.get(url)
7579
releases = response.json()
@@ -79,6 +83,7 @@ def _get_latest_release_from_github(org: str, repo_name: str) -> str:
7983
latest_version_release = valid_releases[0]["tag_name"]
8084
return latest_version_release
8185

86+
8287
# Get the latest release version from GitHub repository
8388
org = "diffpy"
8489
repo_name = "diffpy.utils"

0 commit comments

Comments
 (0)