Skip to content

Commit

Permalink
[stubsabot] Improve error message (#12273)
Browse files Browse the repository at this point in the history
Cf. #12272
  • Loading branch information
srittau committed Jul 4, 2024
1 parent 64d07ae commit 311612e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/stubsabot.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ async def release_contains_py_typed(release_to_download: PypiReleaseDownload, *,
with zipfile.ZipFile(body) as zf:
return all_py_files_in_source_are_in_py_typed_dirs(zf)
elif packagetype == "sdist":
assert release_to_download.filename.endswith(".tar.gz")
assert release_to_download.filename.endswith(
".tar.gz"
), f"Package file {release_to_download.filename!r} does not end with '.tar.gz'"
with tarfile.open(fileobj=body, mode="r:gz") as zf:
return all_py_files_in_source_are_in_py_typed_dirs(zf)
else:
Expand Down

0 comments on commit 311612e

Please sign in to comment.