Skip to content

Commit

Permalink
docs: a small tweak to how we label the tabs for sample configs
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jun 30, 2024
1 parent c654ec0 commit da5f4c9
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions doc/cmd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ collected," add this to your configuration file:
disable_warnings = ["no-data-collected"]

.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:run]
disable_warnings = no-data-collected

.. [[[end]]] (checksum: 66c0c28e863c2a44218190a8a6a3f707)
.. [[[end]]] (checksum: 489285bcfa173b69a286f03fe13e4554)
.. _cmd_datafile:
Expand Down
4 changes: 2 additions & 2 deletions doc/cog_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def show_configs(ini, toml):
`ini` is the ini-file syntax, `toml` is the equivalent TOML syntax.
The equivalence is checked for accuracy, and the process fails if there's
a mismtach.
a mismatch.
A three-tabbed box will be produced.
"""
Expand All @@ -89,7 +89,7 @@ def show_configs(ini, toml):
for name, syntax, text in [
(".coveragerc", "ini", ini),
("pyproject.toml", "toml", toml),
("setup.cfg, tox.ini", "ini", ini2),
("setup.cfg or tox.ini", "ini", ini2),
]:
print(f" .. code-tab:: {syntax}")
print(f" :caption: {name}")
Expand Down
8 changes: 4 additions & 4 deletions doc/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Here's a sample configuration file, in each syntax:
directory = "coverage_html_report"

.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:run]
branch = True
Expand Down Expand Up @@ -257,7 +257,7 @@ Here's a sample configuration file, in each syntax:
[coverage:html]
directory = coverage_html_report

.. [[[end]]] (checksum: 75c6c0c2ee170424cc1c18710e2b4919)
.. [[[end]]] (checksum: 1d4d59eb69af44aacb77c9ebad869b65)
The specific configuration settings are described below. Many sections and
Expand Down Expand Up @@ -535,15 +535,15 @@ equivalent when combining data from different machines:
]
.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:paths]
source =
src/
/jenkins/build/*/src
c:\myproj\src
.. [[[end]]] (checksum: cf06ac36436db0c87be15a85223900d0)
.. [[[end]]] (checksum: a074a5f121a23135dcb6733bca3e20bd)
The names of the entries ("source" in this example) are ignored, you may choose
Expand Down
4 changes: 2 additions & 2 deletions doc/contexts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ The ``[run] dynamic_context`` setting has only one option now. Set it to
dynamic_context = "test_function"

.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:run]
dynamic_context = test_function

.. [[[end]]] (checksum: 5c5d120ee876e5fe26e573e1a5e8551d)
.. [[[end]]] (checksum: 7594c36231f0ef52b554aad8c835ccf4)
Each test function you run will be considered a separate dynamic context, and
coverage data will be segregated for each. A test function is any function
Expand Down
8 changes: 4 additions & 4 deletions doc/excluding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ all of them by adding a regex to the exclusion list:
]

.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:report]
exclude_also =
def __repr__

.. [[[end]]] (checksum: adc6406467518c89a5a6fe2c4b999416)
.. [[[end]]] (checksum: e3194120285bcbac38a92b109edaa20c)
For example, here's a list of exclusions I've used:

Expand Down Expand Up @@ -203,7 +203,7 @@ For example, here's a list of exclusions I've used:
]

.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:report]
exclude_also =
Expand All @@ -218,7 +218,7 @@ For example, here's a list of exclusions I've used:
class .*\bProtocol\):
@(abc\.)?abstractmethod

.. [[[end]]] (checksum: ef1947821b8224c4f02d27f9514e5c5e)
.. [[[end]]] (checksum: 91f09828a1e6d0e92543e14a8ea3ba39)
The :ref:`config_report_exclude_also` option adds regexes to the built-in
default list so that you can add your own exclusions. The older
Expand Down
8 changes: 4 additions & 4 deletions doc/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ a coverage.py plug-in called ``something.plugin``.
plugins = [ "something.plugin" ]

.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:run]
plugins =
something.plugin

.. [[[end]]] (checksum: 788b15abb3c53370ccae3d9348e65385)
.. [[[end]]] (checksum: 6e866323d4bc319d42e3199b08615111)
#. If the plug-in needs its own configuration, you can add those settings in
the .coveragerc file in a section named for the plug-in:
Expand Down Expand Up @@ -121,13 +121,13 @@ a coverage.py plug-in called ``something.plugin``.
option2 = "abc.foo"

.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:something.plugin]
option1 = True
option2 = abc.foo

.. [[[end]]] (checksum: 71aa2ad856e03d228758fd5026fd3a52)
.. [[[end]]] (checksum: b690115dbe7f6c7806567e009b5715c4)
Check the documentation for the plug-in for details on the options it takes.

Expand Down
4 changes: 2 additions & 2 deletions doc/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ current directory:
]
.. code-tab:: ini
:caption: setup.cfg, tox.ini
:caption: setup.cfg or tox.ini

[coverage:run]
omit =
Expand All @@ -139,7 +139,7 @@ current directory:
# omit this single file
utils/tirefire.py

.. [[[end]]] (checksum: 9fa764509b4c484ea613298a20d4b577)
.. [[[end]]] (checksum: 84ad2743cc0c7a077770e50fcedab29d)
The ``source``, ``include``, and ``omit`` values all work together to determine
the source that will be measured.
Expand Down

0 comments on commit da5f4c9

Please sign in to comment.