Walk up for all config files and handle precedence by hauntsaninja · Pull Request #18482 · python/mypy (original) (raw)
if you generally like the idea of having the config files searched up to the fs/project root
Yeah, I think the idea makes sense, thank you for advocating for it!
Can you explain the changes
In #16965 (merged yesterday), we changed from only looking for a config file in the current directory to potentially walking up the directory tree (e.g. to git repo root). However, that PR only looks for pyproject.toml. I think it's easier for maintenance if the various config files are handled similarly, which is what this PR changes. This also fixes precedence: if you have both a mypy.ini and a pyproject.toml in the same directory, you will always get the mypy.ini, instead of inconsistent behaviour depending on if you're in a child directory or not. I'll update this PR with some docs.