Skip to content
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

Make ignore_missing_imports work for libs which had bundled stubs #10582

Merged
merged 1 commit into from Jun 4, 2021

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jun 4, 2021

It has to be specified as a per-module option, if the library used
to have bundled stubs. This way mypy won't silently start ignoring
these missing stubs.

This makes ignore_missing_imports special by making it work a bit
differently, depending on whether it's set globally or per module.

The new behavior is less surprising. This makes it possible to ignore
arbitrary missing third-party stub packages, even those which used to
have bundled stubs.

Fixes #10283.

Originally implemented by @TheCleric in #10283. This is somewhat
simpler alternative implementation which is easier to reason about and
may perform better in some cases of very large configs.

It has to be specified as a per-module option, if the library used
to have bundled stubs. This way mypy won't silently start ignoring
these missing stubs.

This makes `ignore_missing_imports` special by making it work a bit
differently, depending on whether it's set globally or per module.

The new behavior is less surprising. This makes it possible to ignore
arbitrary missing third-party stub packages, even those which used to
have bundled stubs.

Fixes #10283.
@JukkaL JukkaL merged commit 4642a31 into master Jun 4, 2021
@JukkaL JukkaL deleted the ignore-stub-errors branch June 4, 2021 16:51
JukkaL added a commit that referenced this pull request Jun 7, 2021
…0582)

It has to be specified as a per-module option, if the library used
to have bundled stubs. This way mypy won't silently start ignoring
these missing stubs.

This makes ignore_missing_imports special by making it work a bit
differently, depending on whether it's set globally or per module.

The new behavior is less surprising. This makes it possible to ignore
arbitrary missing third-party stub packages, even those which used to
have bundled stubs.

Fixes #10283.

Originally implemented by @TheCleric in #10283. This is somewhat
simpler alternative implementation which is easier to reason about and
may perform better in some cases of very large configs.
@tadeu
Copy link

tadeu commented Jun 24, 2021

I think that this broke dmypy: #10709

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.

--ignore-missing-imports not working for modularized typeshed types
3 participants