MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / get_objects_from_module

Function get_objects_from_module

diffusers/src/diffusers/utils/import_utils.py:763–781  ·  view source on GitHub ↗

Returns a dict of object names and values in a module, while skipping private/internal objects Args: module (ModuleType): Module to extract the objects from. Returns: dict: Dictionary of object names and corresponding values

(module)

Source from the content-addressed store, hash-verified

761
762
763def get_objects_from_module(module):
764 """
765 Returns a dict of object names and values in a module, while skipping private/internal objects
766
767 Args:
768 module (ModuleType):
769 Module to extract the objects from.
770
771 Returns:
772 dict: Dictionary of object names and corresponding values
773 """
774
775 objects = {}
776 for name in dir(module):
777 if name.startswith("_"):
778 continue
779 objects[name] = getattr(module, name)
780
781 return objects
782
783
784class OptionalDependencyNotAvailable(BaseException):

Callers 15

__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85
__init__.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected