Skip to content

Add flag to ignore 'Skipping analyzing ...' #9789

@mfarrugi

Description

@mfarrugi

Pitch

Currently --ignore-missing-imports silences all 3 different errors listed in missing-imports, but missing-type-hints-for-third-party-library is closer to a warning than an error.

The current solution is to list the packages to ignore in a configuration file, which is particularly onerous when there are many packages being built and type-checked.

Feature

Add a flag (eg. --ignore-untyped-imports) that either ignores this error, or downgrades it to a warning:

error: Skipping analyzing X: found module but no type hints or library stubs

Alternatively:

  • the unable-to-find-module error could be changed to no longer be skipped by --ignore-missing-imports, as that is nearly always a misconfiguration of mypy
  • each case could be guarded by a separate flag.

Implementation

https://github.com/python/mypy/blob/master/mypy/build.py#L2410-L2411 and other references to options.ignore_missing_imports would need to be changed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions