setup.cfg - a solution to python config file soup? A howto guide.
Sick of config file soup cluttering up your repo? Me too. However there is a way to at least clean it up for many python tools. Some of the tools you might use and the config files they support... flake8 - .flake8 , setup.cfg , tox.ini , and config/flake8 on Windows pytest - pytest.ini , tox.ini , setup.cfg coverage.py - .coveragerc , setup.cfg , tox.ini mypy - setup.cfg , mypy.ini tox - tox.ini Can mypy use setup.cfg as well? OK, you've convinced me. -- Guido With that mypy now also supports setup.cfg, and we can all remove many more config files. The rules for precedence are easy: read --config-file option - if it's incorrect, exit read [tool].ini - if correct, stop read setup.cfg How to config with setup.cfg? Here's a list to the configuration documentation for setup.cfg. coverage config pytest config flake8 config mypy config behave What does a setup.cfg look like now? Here's an example setup.cfg for you with various too...