bazel-contrib/bazel-mypy-integration

Support pyproject.toml

Closed this issue · 2 comments

pqn commented

As I understand it, the config.bzl assumes provided files are mypy.ini (https://github.com/thundergolfer/bazel-mypy-integration/blob/9e5cafcebfebd310981a02fc0fdf9fbd48350cf9/config.bzl). It would be nice to support pyproject.toml as well.

Pyproject.toml is already supported because mypy is determining if a config file is a toml file or an ini file.
See https://github.com/python/mypy/blob/6cd8c00983a294b4b142ee0f01e91912363d3450/mypy/config_parser.py#L229 .

Yeah, we use a pyproject.toml with this and it works correctly:

build --@mypy_integration//:mypy_config=@@//:pyproject.toml