Skip to content

Commit

Permalink
docs: clarify default exclusion pattern in documentation (#1796)
Browse files Browse the repository at this point in the history
* Update excluding.rst

Clarify default exclusion pattern.

* Update config.rst

Clarify default exclusion pattern.
  • Loading branch information
guillp authored Jun 11, 2024
1 parent 2e849d1 commit 2f540c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ Settings common to many kinds of reporting.
(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. This setting is preferred, because it will preserve the
default exclude patterns instead of overwriting them.
default exclude pattern ``pragma: no cover`` instead of overwriting it.

.. versionadded:: 7.2.0

Expand Down
8 changes: 4 additions & 4 deletions doc/excluding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ code, the "if debug" clause is excluded from reporting::
log_message(msg, a)
b = my_function2()

Any line with a comment of "pragma: no cover" is excluded. If that line
introduces a clause, for example, an if clause, or a function or class
definition, then the entire clause is also excluded. Here the __repr__
function is not reported as missing::
By default, any line with a comment of ``pragma: no cover`` is excluded.
If that line introduces a clause, for example, an ``if`` clause, or a function
or class definition, then the entire clause is also excluded.
Here the ``__repr__`` function is not reported as missing::

class MyObject(object):
def __init__(self):
Expand Down

0 comments on commit 2f540c7

Please sign in to comment.