Problem Description
The docs for [mypy].config_discovery state:
If true, Pants will include any relevant config files during runs (mypy.ini, .mypy.ini, and setup.cfg).
Use [mypy].config instead if your config is in a non-standard location.
However, the mypy subsystem will only discover mypy configs in the build root, while ignoring any/all mypy configs elsewhere. This contradicts the "pants will include any relevant config files" statement from the quote above.
Additionally, the current behavior of [mypy].config_discovery does not comport with mypy's definition of "config discovery":
By default, mypy will discover configuration files by walking up the file system (up until the root of a repository or the root of the filesystem).
Relevant source code
Pants Version
2.32.0
Additional Info
Some related issues touching on how mypy's config_discovery probably should behave:
Problem Description
The docs for
[mypy].config_discoverystate:However, the mypy subsystem will only discover mypy configs in the build root, while ignoring any/all mypy configs elsewhere. This contradicts the "pants will include any relevant config files" statement from the quote above.
Additionally, the current behavior of
[mypy].config_discoverydoes not comport with mypy's definition of "config discovery":Relevant source code
Pants Version
2.32.0Additional Info
Some related issues touching on how mypy's
config_discoveryprobably should behave:pants check#22403