Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Silent imports is too silent #1367

Closed
gvanrossum opened this issue Apr 12, 2016 · 0 comments
Closed

Silent imports is too silent #1367

gvanrossum opened this issue Apr 12, 2016 · 0 comments

Comments

@gvanrossum
Copy link
Member

We've encountered a few cases where users were baffled when they found out that a certain error (to them obvious) was not reported, and the reason was that some essential file was excluded due to use of the --silent-imports (-s) flag.

It seems to be particularly baffling when there's a base class that comes from a silenced import. See e.g. #1363 -- once we fix that, there remains the problem that Base has type Any and so in Derived, self has effectively type Any (as do all other instances of Derived).

One possibility would be to have an option that's just like --silent-imports but which reports an error at every suppressed import (possibly displaying a different message depending on whether the module was found or not). This option might also add an additional message when a base class is undefined due to a missing import.

Another approach might be to treat this as a new reporting option.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant