inspect#
Python inspect helper functions.
Module Contents#
Functions#
|
Returns a dictionary of class names by class types of the |
|
Generates a UML diagram of a given module or class. |
- get_classes(*modules: types.ModuleType) Dict[str, Type[Any]] [source]#
Returns a dictionary of class names by class types of the modules given as arguments.
from quantify_scheduler.helpers import inspect from my_module import foo class_dict: Dict[str, type] = inspect.get_classes(foo) print(class_dict) // { 'Bar': my_module.foo.Bar }
- Parameters
modules – Variable length of modules.
- Returns
A dictionary containing the class names by class reference.
- make_uml_diagram(obj_to_plot: Union[types.ModuleType, Type[Any]], options: list[str]) str [source]#
Generates a UML diagram of a given module or class. This function is a wrapper of pylint.pyreverse.
- Parameters
obj_to_plot – The module or class to visualize
options – A string containing the plotting options for pyreverse
- Returns
The name of the generated png image