Resolves #10283; check for module level ignore_missing_imports on missing stubs #10546
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.
Description
Fixes #10283
For missing type stubs for legacy bundled packages, we will now look for module level overrides for ignore_missing_imports. If present, we will not issue an error like:
Cannot find implementation or library stub for module named "redis.sentinel"
Test Plan
3 new test scenarios were added for this PR in
check-modules.test
for a missing type stub for a legacy bundled package:ignore_missing_imports
globalignore_missing_imports
module overrideThe first two tests were passing before the code change and are there to help ensure no regression. The last test was the use case from #10283 to make sure the new code accomplished its mission.