Skip to content

Commit dde2466

Browse files
committed
fix: address Ruff errors in existing code
Latest Ruff complains about unused variables in two files. Signed-off-by: Christian Heimes <[email protected]>
1 parent 3510875 commit dde2466

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/fromager/bootstrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ def _download_wheel_from_cache(
574574
changelogs = pbi.get_changelog(resolved_version)
575575
logger.debug(f"{req.name} has change logs {changelogs}")
576576

577-
dist_name, dist_version, build_tag, _ = wheels.extract_info_from_wheel_file(
577+
_, _, build_tag, _ = wheels.extract_info_from_wheel_file(
578578
req, wheelfile_name
579579
)
580580
if expected_build_tag and expected_build_tag != build_tag:
@@ -604,7 +604,7 @@ def _download_wheel_from_cache(
604604
def _unpack_metadata_from_wheel(
605605
self, req: Requirement, resolved_version: Version, wheel_filename: pathlib.Path
606606
) -> pathlib.Path | None:
607-
dist_name, dist_version, build_tag, _ = wheels.extract_info_from_wheel_file(
607+
dist_name, dist_version, _, _ = wheels.extract_info_from_wheel_file(
608608
req,
609609
wheel_filename,
610610
)

tests/test_wheels.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pathlib
2-
import tempfile
32
import zipfile
43
from unittest.mock import Mock, patch
54

@@ -116,7 +115,7 @@ def test_download_wheel_unquotes_url_encoded_filenames(tmp_path: pathlib.Path) -
116115
# URL with encoded plus sign (%2B)
117116
wheel_url = "https://example.test/test_pkg-1.0%2Blocal-py3-none-any.whl"
118117

119-
mock_wheel, mock_wheel_file = tempfile.mkstemp()
118+
mock_wheel_file = tmp_path / "mockwheel.whl"
120119
with zipfile.ZipFile(mock_wheel_file, "w") as zf:
121120
# Add minimal legitimate files
122121
zf.writestr("test_pkg/__init__.py", "")

0 commit comments

Comments
 (0)