Skip to content

Commit 9cd20ce

Browse files
authored
Improve stubsabot logic for finding the first release with a py.typed file (#9600)
1 parent 0024dc4 commit 9cd20ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/stubsabot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ async def release_contains_py_typed(release_to_download: PypiReleaseDownload, *,
173173
async def find_first_release_with_py_typed(pypi_info: PypiInfo, *, session: aiohttp.ClientSession) -> PypiReleaseDownload:
174174
release_iter = pypi_info.releases_in_descending_order()
175175
while await release_contains_py_typed(release := next(release_iter), session=session):
176-
first_release_with_py_typed = release
176+
if not release.version.is_prerelease:
177+
first_release_with_py_typed = release
177178
return first_release_with_py_typed
178179

179180

0 commit comments

Comments
 (0)