Map true modules to exported name
(module, module_path)
| 56 | |
| 57 | |
| 58 | def get_module_map(module, module_path): |
| 59 | """Map true modules to exported name""" |
| 60 | if not module_is_public(module): |
| 61 | return {} |
| 62 | m = {} |
| 63 | for symbol_name in dir(module): |
| 64 | if symbol_name.startswith("_"): |
| 65 | continue |
| 66 | symbol = getattr(module, symbol_name) |
| 67 | symbol_path = "%s.%s" % (module_path, symbol_name) |
| 68 | m[symbol] = symbol_path |
| 69 | if inspect.ismodule(symbol): |
| 70 | m.update(get_module_map(symbol, symbol_path)) |
| 71 | return m |
| 72 | |
| 73 | |
| 74 | def get_first_public_parent(cls): |
no test coverage detected