Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve test cases around #16486
This PR does not change any actual mypy behavior, only hardens the stubgen tests. The specific changes are:
type(x) is Foo
check #18486). This wasn't covered by the CI check so far. I've added check now, which would have avoided the regression. My goal for follow up PRs would be that we can usemypy --disallow-untyped-defs
or evenmypy --strict
on the output.stubgen
andstubgen-include-docs
. This was a bit confusing, because the folderstubgen
suggested it contains the stubgen (implementation). I went forexpected_stubs_no_docs
andexpected_stubs_with_docs
to make the role of the two folders more explicit.test-stubgen.sh
: The pre-delete functionality was broken, because the*
was quoted and therefore did not match.