Skip to content

Commit 70ad079

Browse files
committedApr 30, 2023
docs: describe exclude_also better
1 parent dc36a46 commit 70ad079

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
 

‎doc/config.rst

+7-5
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,9 @@ Settings common to many kinds of reporting.
384384
containing a match for one of these regexes is excluded from being reported as
385385
missing. More details are in :ref:`excluding`. If you use this option, you
386386
are replacing all the exclude regexes, so you'll need to also supply the
387-
"pragma: no cover" regex if you still want to use it.
387+
"pragma: no cover" regex if you still want to use it. The
388+
:ref:`config_report_exclude_also` setting can be used to specify patterns
389+
without overwriting the default set.
388390

389391
You can exclude lines introducing blocks, and the entire block is excluded. If
390392
you exclude a ``def`` line or decorator line, the entire function is excluded.
@@ -400,10 +402,10 @@ you'll exclude any line with three or more of any character. If you write
400402
[report] exclude_also
401403
.....................
402404

403-
(multi-string) A list of regular expressions. This setting is the same as
404-
:ref:`config_report_exclude_lines`: it adds patterns for lines to exclude from
405-
reporting. This setting will preserve the default exclude patterns instead of
406-
overwriting them.
405+
(multi-string) A list of regular expressions. This setting is similar to
406+
:ref:`config_report_exclude_lines`: it specifies patterns for lines to exclude
407+
from reporting. The difference is this setting will preserve the default
408+
exclude patterns instead of overwriting them.
407409

408410
.. versionadded:: 7.2.0
409411

0 commit comments

Comments
 (0)
Please sign in to comment.