Allow configuration via pyproject.toml

Issue #664 closed
pradyunsg
created an issue

As per PEP 518, tools can use tool.<pypi-name> namespace within the pyproject.toml file if they own <pypi-name> on PyPI.

Allowing configuration via the above mechanism would allow for users to have a single file in their root directory, for configuring this coverage (and other tools) for their project. Essentially, this would allow eliminating a .coveragerc file in the root of the project in favor of using pyproject.toml.

Comments (3)

  1. Ned Batchelder repo owner

    This is a good idea. One twist: coverage.py has no required dependencies. It will need a toml parser to parse the pyproject.toml file. My inclination is to implement this so that if the toml module is available, then coverage will try to read the pyproject.toml file. Installing coverage won't install toml automatically, you'll have to do that yourself if you want to use pyproject.toml for configuration.

  2. Log in to comment