Skip to content

Commit 8b818f9

Browse files
committed
Fix TypeError in ext.coverage logging
If there are any missing modules when using the coverage builder, a TypeError is thrown instead of a warning message being printed. The warning message needs a %s in the message to match the list of missing modules provided as a string.
1 parent eaebbec commit 8b818f9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ Bugs fixed
118118
for objects documented as ``:py:data:`` to be hyperlinked in function signatures.
119119
* #13858: doctest: doctest blocks are now correctly added to a group defined by the
120120
configuration variable ``doctest_test_doctest_blocks``.
121+
* #13885: Coverage builder: Fix TypeError when warning about missing modules.
122+
Patch by Damien Ayers.
121123

122124

123125
Testing

sphinx/ext/coverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def _determine_py_coverage_modules(
156156
logger.warning(
157157
__(
158158
'the following modules are specified in coverage_modules '
159-
'but were not documented'
159+
'but were not documented: %s'
160160
),
161161
', '.join(missing_modules),
162162
)

0 commit comments

Comments
 (0)