Skip to content

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

Merged

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Feb 20, 2023

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)

Copy link
Collaborator

@hauntsaninja hauntsaninja left a 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
Copy link
Collaborator

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 its tests/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".

Copy link
Collaborator Author

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah

@AlexWaygood
Copy link
Member

CC @AlexWaygood because this affects typeshed-stats (unless it reuses parse_metadata.py, idk how you implemented it)

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

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo!

@AlexWaygood AlexWaygood merged commit ed6748f into python:main Feb 20, 2023
@Avasam Avasam deleted the Change-ignore_missing_stub-default-to-false branch February 20, 2023 22:41
@AlexWaygood
Copy link
Member

Fixed the typeshed-stats logic in AlexWaygood/typeshed-stats@5689d24 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change ignore_missing_stub default to false?
3 participants