MCPcopy
hub / github.com/astral-sh/ruff-pre-commit / get_all_versions

Function get_all_versions

mirror.py:39–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38
39def get_all_versions() -> list[Version]:
40 response = urllib3.request("GET", "https://pypi.org/pypi/ruff/json")
41 if response.status != 200:
42 raise RuntimeError("Failed to fetch versions from pypi")
43
44 versions = [Version(release) for release in response.json()["releases"]]
45 return sorted(versions)
46
47
48def get_current_version(pyproject: dict) -> Version:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected