Skip to content

Adding an --ignore-missing-type-hints config #10660

@evinism

Description

@evinism

Feature

We introduce a new configuration option, namely --ignore-missing-type-hints as a lighter alternative to --ignore-missing-imports. Such a config would be allowed in both the global level and to package-specific configs.

The config would simply disable "Skipping analyzing "offending.package": found module but no type hints or library stubs" error messages. More specifically, we'd be disabling errors on ModuleNotFoundReason.FOUND_WITHOUT_TYPE_HINTS.

Pitch

Having to ignore-missing-imports each individual package I import that hasn't built type hints is really frustrating. Several of the notes here for resolving this error are largely non-actionable -- many libraries don't have types associated with them, nor stubs in typeshed.

There seem to be a few related issues, for example #4542, #9789 (thanks @hauntsaninja)

Given that a specific ModuleNotFoundReason exists, it makes me wonder why this flag hasn't been implemented yet -- is there a specific technical reason for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions