Iterate over all submodules of the given parent modules.
(self, parent_modules: list[pkgutil.ModuleInfo])
| 200 | return not module_name.startswith("_") |
| 201 | |
| 202 | def iter_submodules(self, parent_modules: list[pkgutil.ModuleInfo]) -> Iterator[pkgutil.ModuleInfo]: |
| 203 | """Iterate over all submodules of the given parent modules.""" |
| 204 | specs = [info.module_finder.find_spec(info.name, None) |
| 205 | for info in parent_modules if info.ispkg] |
| 206 | search_locations = set(chain.from_iterable( |
| 207 | getattr(spec, 'submodule_search_locations', []) |
| 208 | for spec in specs if spec |
| 209 | )) |
| 210 | return pkgutil.iter_modules(search_locations) |
| 211 | |
| 212 | def get_path_and_prefix(self, dotted_name: str) -> tuple[str, str]: |
| 213 | """ |
no test coverage detected