Skip to content

Commit 30cb1a9

Browse files
committed
coverage: Don't expose function as public
We don't want this to be a public API. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 31829a9 commit 30cb1a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sphinx/ext/coverage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _add_row(col_widths: list[int], columns: list[str], separator: str) -> Itera
6666
yield _add_line(col_widths, separator)
6767

6868

69-
def load_modules(mod_name: str, ignored_module_exps: list[re.Pattern[str]]) -> set[str]:
69+
def _load_modules(mod_name: str, ignored_module_exps: list[re.Pattern[str]]) -> set[str]:
7070
"""Recursively load all submodules.
7171
7272
:param mod_name: The name of a module to load submodules for.
@@ -93,7 +93,7 @@ def load_modules(mod_name: str, ignored_module_exps: list[re.Pattern[str]]) -> s
9393
continue
9494

9595
if sub_mod_info.ispkg:
96-
modules |= load_modules(f'{mod_name}.{sub_mod_info.name}', ignored_module_exps)
96+
modules |= _load_modules(f'{mod_name}.{sub_mod_info.name}', ignored_module_exps)
9797
else:
9898
for exp in ignored_module_exps:
9999
if exp.match(sub_mod_info.name):
@@ -229,7 +229,7 @@ def build_py_coverage(self) -> None:
229229
modules = set()
230230
for mod_name in self.module_names:
231231
try:
232-
modules |= load_modules(mod_name, self.mod_ignorexps)
232+
modules |= _load_modules(mod_name, self.mod_ignorexps)
233233
except ImportError as err:
234234
# TODO(stephenfin): Define a subtype for all logs in this module
235235
logger.warning(__('module %s could not be imported: %s'), mod_name, err)

0 commit comments

Comments
 (0)