diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-04-30 09:58:06 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-04-30 09:58:06 -0400 |
commit | 70ad079f4437359b9f198da925a6f659bf2eaddc (patch) | |
tree | 4eeda75ba18bc01500b712fc4d39f2ce901751cb | |
parent | dc36a46778f5e37a4855bc9d202b397ba63f99a7 (diff) | |
download | python-coveragepy-git-70ad079f4437359b9f198da925a6f659bf2eaddc.tar.gz |
docs: describe exclude_also better
-rw-r--r-- | doc/config.rst | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/config.rst b/doc/config.rst index 152b3af4..f81d7d00 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -384,7 +384,9 @@ Settings common to many kinds of reporting. containing a match for one of these regexes is excluded from being reported as missing. More details are in :ref:`excluding`. If you use this option, you are replacing all the exclude regexes, so you'll need to also supply the -"pragma: no cover" regex if you still want to use it. +"pragma: no cover" regex if you still want to use it. The +:ref:`config_report_exclude_also` setting can be used to specify patterns +without overwriting the default set. You can exclude lines introducing blocks, and the entire block is excluded. If 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 [report] exclude_also ..................... -(multi-string) A list of regular expressions. This setting is the same as -:ref:`config_report_exclude_lines`: it adds patterns for lines to exclude from -reporting. This setting will preserve the default exclude patterns instead of -overwriting them. +(multi-string) A list of regular expressions. This setting is similar to +:ref:`config_report_exclude_lines`: it specifies patterns for lines to exclude +from reporting. The difference is this setting will preserve the default +exclude patterns instead of overwriting them. .. versionadded:: 7.2.0 |