Skip to content

Commit c24d4e6

Browse files
committed
Mention toml support in documentation.
1 parent 63f941d commit c24d4e6

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGES.rst

+3
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,14 @@ Unreleased
4545
plugins, but now it does, closing `issue 834`_.
4646

4747

48+
- Added TOML configuration support, including pyproject.toml `issue 664`_.
49+
4850
.. _issue 720: https://github.com/nedbat/coveragepy/issues/720
4951
.. _issue 822: https://github.com/nedbat/coveragepy/issues/822
5052
.. _issue 834: https://github.com/nedbat/coveragepy/issues/834
5153
.. _issue 829: https://github.com/nedbat/coveragepy/issues/829
5254
.. _issue 846: https://github.com/nedbat/coveragepy/issues/846
55+
.. _issue 664: https://github.com/nedbat/coveragepy/issues/664
5356

5457

5558
.. _changes_50a6:

coverage/cmdline.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ class Opts(object):
146146
'', '--rcfile', action='store',
147147
help=(
148148
"Specify configuration file. "
149-
"By default '.coveragerc', 'setup.cfg' and 'tox.ini' are tried. "
150-
"[env: COVERAGE_RCFILE]"
149+
"By default '.coveragerc', 'pyproject.toml', 'setup.cfg' and "
150+
"'tox.ini' are tried. [env: COVERAGE_RCFILE]"
151151
),
152152
)
153153
source = optparse.make_option(

doc/config.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ Coverage.py will read settings from other usual configuration files if no other
2929
configuration file is used. It will automatically read from "setup.cfg" or
3030
"tox.ini" if they exist. In this case, the section names have "coverage:"
3131
prefixed, so the ``[run]`` options described below will be found in the
32-
``[coverage:run]`` section of the file.
32+
``[coverage:run]`` section of the file. If Coverage.py is installed with the
33+
``toml`` extra (``pip install coverage[toml]``), it will automatically read
34+
from "pyproject.toml". Configuration must be within the `[tool.coverage]`
35+
section, e.g. ``[tool.coverage.run]`.
3336
3437
3538
Syntax

0 commit comments

Comments
 (0)