Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
- id: blacken-docs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
- id: ruff-format
12 changes: 6 additions & 6 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def test_get_scheme_dict():
def test_get_scheme_dict_prefix():
d = get_scheme_dict(distribution_name="foo", prefix="/foo")
for key in ("purelib", "platlib", "headers", "scripts", "data"):
assert d[key].startswith(
f"{os.sep}foo"
), f"{key} does not start with /foo: {d[key]}"
assert d[key].startswith(f"{os.sep}foo"), (
f"{key} does not start with /foo: {d[key]}"
)


def test_main(fancy_wheel, tmp_path):
Expand Down Expand Up @@ -62,9 +62,9 @@ def test_main_prefix(fancy_wheel, tmp_path):
installed_py_files = list(destdir.rglob("*.py"))

for f in installed_py_files:
assert str(f.parent).startswith(
str(destdir / "foo")
), f"path does not respect destdir+prefix: {f}"
assert str(f.parent).startswith(str(destdir / "foo")), (
f"path does not respect destdir+prefix: {f}"
)
assert {f.stem for f in installed_py_files} == {"__init__", "__main__", "data"}

installed_pyc_files = destdir.rglob("*.pyc")
Expand Down
2 changes: 1 addition & 1 deletion tools/update_launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def _get_distlib_page(client: httpx.AsyncClient) -> Any:

def _get_link_from_response(json_response: dict[str, Any]) -> tuple[str, str] | None:
version = max(version_str.split(".") for version_str in json_response["versions"])
filename = f'distlib-{".".join(version)}.tar.gz'
filename = f"distlib-{'.'.join(version)}.tar.gz"
for file_info in json_response["files"]:
if file_info["filename"] == filename:
return file_info["url"], filename
Expand Down