Add packages
and modules
keys to config file format
#9883
Labels
packages
and modules
keys to config file format
#9883
Feature
Offer configuration variables for
packages
andmodules
to match the command-line flags, much likefiles
matches listing files on the command line. Intended to work exactly like the command line flags, with the exception that they would not override afiles
key and havingfiles
and either of the new keys in the same config file would create a conflict.Usage meant to be something like this (actual code this would work with linked below):
To match a command line like
mypy -p spack -p builtin.packages -p builtin_mock.packages
Pitch
The main use comes from, spack, a project I'm adding type checking to. It's a package manager where the libraries, tool and all package definition files are written in python. Having mypy check the library without arguments is simple, I can just write a
files
key that covers all files and it will work fine, but the packages are in a structure like this:If I use a
files
key for these, they are all treated as duplicatepackage
modules, and mypy errors out (probably appropriately). They can however be treated as a package, and mypy works quite well on the library and the whole package tree in that mode (especially after the recursive checking fixes). The trick now is that I can't make runningmypy
check the packages tree without arguments or wrapping or similar.I'd like to add support for specifying these in the configuration file to bring them up to the same level of support as listing files, as mentioned in PR #9834.
The text was updated successfully, but these errors were encountered: