Permit configuration via a stand-alone TOML file (`mypy.toml`)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Feature
In #5205, MyPy gained support for declaring configuration in the TOML format, but only in pyproject.toml. I propose supporting configuration via a stand-alone TOML document, such as mypy.toml or .mypy.toml.
Pitch
This parallels, and perhaps would eventually replace, configuration via mypy.ini. This is most useful when checking non-project code, such as in Python (https://github.com/python/cpython/pull/129708), where we have several distinct mypy.ini files to support type-checking different directories of a larger project. It may be useful for mono-repo layouts, where again the use of pyproject.toml is undesirable. Finally, this would be useful to keep tool configuration to independent files — in the Sphinx project, there are several hundred lines of mypy configuration in pyproject.toml, dominating the content of the file.
A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing TOML configuration support introduced in #5205 and trace how configuration files are discovered and parsed. Add support for a standalone mypy.toml or .mypy.toml while preserving the existing pyproject.toml behavior; done means the standalone file is recognized and its settings are applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100