bazel-contrib/bazel-mypy-integration

exclude setting in mypy.ini does not work

Closed this issue · 1 comments

Even after trying:

[mypy]
exclude = .* # exclude everything

I cannot get the aspect to exclude files when building. I'm certain my mypy.ini is being picked up correctly as other settings do work

Any tool that hands mypy a list of files to check will have this problem.

https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-exclude

Note that this flag only affects recursive directory tree discovery, that is, when mypy is discovering files within a directory tree or submodules of a package to check. If you pass a file or module explicitly it will still be checked.

I think you'd have to make a feature request similar to https://docs.astral.sh/ruff/settings/#force-exclude