Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
disallow-any-unimported
flag invertible (#18030)
The `--follow-imports=skip` CLI option is pretty much unusable in a project where `disallow_any_unimported` is set to true in the configuration file, as this results in a large number of errors (due to both flags being incompatible). We have a pretty standard project configuration file (with `disallow_any_unimported = true` and `follow_imports = 'normal'`), but for specific local development cases where we want to run the mypy CLI with `--follow-imports=skip` it's incredibly noisy due to the number of errors produced. This change proposes making the `disallow-any-unimported` invertible, so that the CLI can be used with `--follow-imports=skip` in a less noisy way by using: ```bash mypy --follow-imports=skip --allow-any-unimported path/to/my/file.py ```
- Loading branch information