Args: Returns a dict of object names and values in a module, while skipping private/internal objects module (ModuleType): Module to extract the objects from. Returns: dict: Dictionary of object names and corresponding values
(module)
| 643 | |
| 644 | |
| 645 | def get_objects_from_module(module): |
| 646 | """ |
| 647 | Args: |
| 648 | Returns a dict of object names and values in a module, while skipping private/internal objects |
| 649 | module (ModuleType): |
| 650 | Module to extract the objects from. |
| 651 | |
| 652 | Returns: |
| 653 | dict: Dictionary of object names and corresponding values |
| 654 | """ |
| 655 | |
| 656 | objects = {} |
| 657 | for name in dir(module): |
| 658 | if name.startswith("_"): |
| 659 | continue |
| 660 | objects[name] = getattr(module, name) |
| 661 | |
| 662 | return objects |
| 663 | |
| 664 | |
| 665 | class OptionalDependencyNotAvailable(BaseException): |
no outgoing calls
no test coverage detected