Skip to content

Commit 70967d9

Browse files
stephenfinpicnixz
andauthored
Address review nits
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 30cb1a9 commit 70967d9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sphinx/ext/coverage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def build_py_coverage(self) -> None:
344344

345345
def _write_py_statistics(self, op: TextIO) -> None:
346346
""" Outputs the table of ``op``."""
347-
all_modules = set(self.py_documented.keys()).union(set(self.py_undocumented.keys()))
347+
all_modules = frozenset(self.py_documented.keys() | self.py_undocumented.keys())
348348
all_objects: set[str] = set()
349349
all_documented_objects: set[str] = set()
350350
for module in all_modules:
@@ -363,7 +363,7 @@ def _write_py_statistics(self, op: TextIO) -> None:
363363

364364
table.append([module, '%.2f%%' % value, '%d' % len(self.py_undocumented[module])])
365365

366-
if len(all_objects):
366+
if all_objects:
367367
table.append([
368368
'TOTAL',
369369
f'{100 * len(all_documented_objects) / len(all_objects):.2f}%',

tests/roots/test-ext-coverage/grog/coverage_missing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ class Missing:
55

66
def missing_a(self):
77
"""An undocumented method."""
8-
pass

0 commit comments

Comments
 (0)