basedmypy
basedmypy copied to clipboard
Specify configuration override using path instead of module name
Currently, [[tool.mypy.overrides]] in pyproject.toml needs to specify what the overrides apply to using module. Would be useful to be able to specify path instead (eg. to apply a different configuration to everything in stubs folder).
eg.
[[tool.mypy.overrides]]
path = "stubs"
allow_untyped_defs = true
Edit Another usecase is type checking misc scripts that aren't in a package.
Potentially also paths like this, to only match pyi files within the stubs folder (or any subfolders)
[[tool.mypy.overrides]]
path = "stubs/**/*.pyi"
allow_untyped_defs = true
I definitely agree, this is a much needed feature. Another usecase is type checking misc scripts that aren't in a package.