Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 19, 2024
1 parent e8e74a0 commit 8829e78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lightning_utilities/docs/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from typing import Iterable, Optional, Tuple, Union



def _transform_changelog(path_in: str, path_out: str) -> None:
"""Adjust changelog titles so not to be duplicated.
Expand Down Expand Up @@ -77,10 +76,12 @@ def _load_pypi_versions(package_name):
['0.9.6', '0.9.8', '1.0', ...]
>>> _load_pypi_versions("scikit-learn") # doctest: +ELLIPSIS
['0.9', '0.10', '0.11', '0.12', ...]
"""
import requests
from distutils.version import LooseVersion

import requests

url = f"https://pypi.org/pypi/{package_name}/json"
data = requests.get(url).json()
versions = data["releases"].keys()
Expand Down

0 comments on commit 8829e78

Please sign in to comment.