(module_name, keep_other=True)
| 267 | |
| 268 | |
| 269 | def dir_of_mod_or_error(module_name, keep_other=True): |
| 270 | module = import_module(module_name) |
| 271 | item_names = sorted(set(dir(module))) |
| 272 | result = {} |
| 273 | for item_name in item_names: |
| 274 | item = getattr(module, item_name) |
| 275 | # don't repeat items imported from other modules |
| 276 | if keep_other or is_child(module, item) or inspect.getmodule(item) is None: |
| 277 | result[item_name] = extra_info(item) |
| 278 | return result |
| 279 | |
| 280 | |
| 281 | def gen_modules(): |
no test coverage detected