-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[stubsabot] Support "Removal" PRs #14401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, except for a few (debatable) nits.
try: | ||
with metadata_path(distribution).open("rb") as file: | ||
data = tomlkit.load(file) | ||
except FileNotFoundError: | ||
raise NoSuchStubError(f"Typeshed has no stubs for {distribution!r}!") from None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for later: We should probably extract that into a separate function in ts_utils.metadata
. This is used several times in a few files. But in a later PR, not here.
if not comment: | ||
return False | ||
|
||
release_date_string = comment.removeprefix("# Released on ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This is probably also something that we should put into metadata (possibly as a structured obsolete
field with since_version
and since_date
fields), but again in a later PR.
Thank you! |
discuss: #14402