Skip to content

Commit cb95505

Browse files
committed
lol forgot to update the call. And run black
1 parent 30343d4 commit cb95505

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

tests/tools/wheelmaker_test.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,15 @@ def test_arcname_from(self) -> None:
1818
("foo/bar/baz/file.py", "", ["baz", "foo/bar"], "/baz/file.py"),
1919
]
2020
for name, prefix, strip, want in checks:
21-
with self.subTest(name=name, distribution_prefix=prefix, strip_path_prefixes=strip, want=want):
22-
got = wheelmaker.arcname_from(name=name, distribution_prefix=prefix, strip_path_prefixes=strip)
21+
with self.subTest(
22+
name=name,
23+
distribution_prefix=prefix,
24+
strip_path_prefixes=strip,
25+
want=want,
26+
):
27+
got = wheelmaker.arcname_from(
28+
name=name, distribution_prefix=prefix, strip_path_prefixes=strip
29+
)
2330
self.assertEqual(got, want)
2431

2532

tools/wheelmaker.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def normalize_pep440(version):
9898
return str(packaging.version.Version(f"0+{sanitized}"))
9999

100100

101-
def arcname_from(name: str, distribution_prefix: str, strip_path_prefixes:list[str] | None = None):
101+
def arcname_from(
102+
name: str, distribution_prefix: str, strip_path_prefixes: list[str] | None = None
103+
):
102104
# Always use unix path separators.
103105
normalized_arcname = name.replace(os.path.sep, "/")
104106
# Don't manipulate names filenames in the .distinfo or .data directories.
@@ -148,7 +150,11 @@ def add_file(self, package_filename, real_filename):
148150
)
149151
return
150152

151-
arcname = arcname_from(package_filename)
153+
arcname = arcname_from(
154+
package_filename,
155+
distribution_prefix=self._distribution_prefix,
156+
strip_path_prefixes=self._strip_path_prefixes,
157+
)
152158
zinfo = self._zipinfo(arcname)
153159

154160
# Write file to the zip archive while computing the hash and length
@@ -570,7 +576,9 @@ def get_new_requirement_line(reqs_text, extra):
570576
else:
571577
return f"Requires-Dist: {req.name}{req_extra_deps}{req.specifier}; {req.marker}"
572578
else:
573-
return f"Requires-Dist: {req.name}{req_extra_deps}{req.specifier}; {extra}".strip(" ;")
579+
return f"Requires-Dist: {req.name}{req_extra_deps}{req.specifier}; {extra}".strip(
580+
" ;"
581+
)
574582

575583
for meta_line in metadata.splitlines():
576584
if not meta_line.startswith("Requires-Dist: "):

0 commit comments

Comments
 (0)