Skip to content

Commit 439ccad

Browse files
committed
style(docs): use definition list for warnings
1 parent a49ca09 commit 439ccad

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

doc/cmd.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -235,51 +235,48 @@ Warnings
235235
During execution, coverage.py may warn you about conditions it detects that
236236
could affect the measurement process. The possible warnings include:
237237

238-
* ``Couldn't parse Python file XXX (couldnt-parse)`` |br|
238+
Couldn't parse Python file XXX (couldnt-parse)
239239
During reporting, a file was thought to be Python, but it couldn't be parsed
240240
as Python.
241241

242-
* ``Trace function changed, data is likely wrong: XXX (trace-changed)`` |br|
242+
Trace function changed, data is likely wrong: XXX (trace-changed)
243243
Coverage measurement depends on a Python setting called the trace function.
244244
Other Python code in your product might change that function, which will
245245
disrupt coverage.py's measurement. This warning indicates that has happened.
246246
The XXX in the message is the new trace function value, which might provide
247247
a clue to the cause.
248248

249-
* ``Module XXX has no Python source (module-not-python)`` |br|
249+
Module XXX has no Python source (module-not-python)
250250
You asked coverage.py to measure module XXX, but once it was imported, it
251251
turned out not to have a corresponding .py file. Without a .py file,
252252
coverage.py can't report on missing lines.
253253

254-
* ``Module XXX was never imported (module-not-imported)`` |br|
254+
Module XXX was never imported (module-not-imported)
255255
You asked coverage.py to measure module XXX, but it was never imported by
256256
your program.
257257

258-
* ``No data was collected (no-data-collected)`` |br|
258+
No data was collected (no-data-collected)
259259
Coverage.py ran your program, but didn't measure any lines as executed.
260260
This could be because you asked to measure only modules that never ran,
261261
or for other reasons.
262262

263-
* ``Module XXX was previously imported, but not measured
264-
(module-not-measured)``
265-
|br|
263+
Module XXX was previously imported, but not measured (module-not-measured)
266264
You asked coverage.py to measure module XXX, but it had already been imported
267265
when coverage started. This meant coverage.py couldn't monitor its
268266
execution.
269267

270-
* ``Already imported a file that will be measured: XXX (already-imported)``
271-
|br|
268+
Already imported a file that will be measured: XXX (already-imported)
272269
File XXX had already been imported when coverage.py started measurement. Your
273270
setting for ``--source`` or ``--include`` indicates that you wanted to
274271
measure that file. Lines will be missing from the coverage report since the
275272
execution during import hadn't been measured.
276273

277-
* ``--include is ignored because --source is set (include-ignored)`` |br|
274+
\-\-include is ignored because \-\-source is set (include-ignored)
278275
Both ``--include`` and ``--source`` were specified while running code. Both
279276
are meant to focus measurement on a particular part of your source code, so
280277
``--include`` is ignored in favor of ``--source``.
281278

282-
* ``Conflicting dynamic contexts (dynamic-conflict)`` |br|
279+
Conflicting dynamic contexts (dynamic-conflict)
283280
The ``[run] dynamic_context`` option is set in the configuration file, but
284281
something (probably a test runner plugin) is also calling the
285282
:meth:`.Coverage.switch_context` function to change the context. Only one of
@@ -293,6 +290,7 @@ collected," add this to your .coveragerc file::
293290
disable_warnings = no-data-collected
294291

295292
or pyproject.toml::
293+
296294
[tool.coverage.run]
297295
disable_warnings = ['no-data-collected']
298296

0 commit comments

Comments
 (0)