-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Change ignore_missing_stub
default to false
#9779
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
Change ignore_missing_stub
default to false
#9779
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.
Thanks!
tests/README.md
Outdated
@@ -170,16 +170,17 @@ By default, stubtest emits an error if a public object is present at runtime | |||
but missing from the stub. However, this behaviour can be disabled using the | |||
`--ignore-missing-stub` option. | |||
|
|||
Many third-party stubs packages in typeshed are currently incomplete, and so by | |||
default, `stubtest_third_party.py` runs stubtest with the | |||
Most third-party stubs packages in typeshed are currently complete (as far as stubtest is |
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.
Github won't let me leave a suggestion, but I'd replace this paragraph with something like:
If a distribution has
ignore_missing_stub = true
in the
tool.stubtest
section of itstests/METADATA.toml
file,stubtest_third_party.py
will test that distribution with the--ignore-missing-stub
option. This indicates that the stubs for this distribution are considered "incomplete".
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.
A lot less verbose, I like it. Would you keep the example?
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.
Nah
Yeah it'll break typeshed-stats, but it's not hard to unbreak :) the implementation's here, if you're curious: https://github.com/AlexWaygood/typeshed-stats/blob/main/src/typeshed_stats/gather.py#L406 |
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.
Woohoo!
Fixed the |
Closes #9538 which got lots of thumbs up, and hopefully I'm not misinterpreting @hauntsaninja 's comment in python/mypy#14692 (comment) saying he advocated against
--ignore-missing-stub
by default.I wanted to wait until after mypy 1.0 (with its many stubtest fixes) for this. Should help promote complete stubs.
CC @AlexWaygood because this affects typeshed-stats (unless it reuses
parse_metadata.py
, idk how you implemented it)