MCPcopy Index your code
hub / github.com/deepfakes/faceswap / get_module_objects

Function get_module_objects

lib/utils.py:328–348  ·  view source on GitHub ↗

Return a list of all public objects within the given module Parameters ---------- module : str The module to parse for public objects Returns ------- list[str] A list of object names that exist within the given module Example ------- >>> __all_

(module: str)

Source from the content-addressed store, hash-verified

326
327
328def get_module_objects(module: str) -> list[str]:
329 """ Return a list of all public objects within the given module
330
331 Parameters
332 ----------
333 module : str
334 The module to parse for public objects
335
336 Returns
337 -------
338 list[str]
339 A list of object names that exist within the given module
340
341 Example
342 -------
343 >>> __all__ = get_module_objects(__name__)
344 ["foo", "bar", "baz"]
345 """
346 return [name_ for name_, obj in inspect.getmembers(sys.modules[module])
347 if getattr(obj, "__module__", None) == module
348 and not name_.startswith("_")]
349
350
351def convert_to_secs(*args: int) -> int:

Callers 15

update_deps.pyFile · 0.90
setup.pyFile · 0.90
detected_faces.pyFile · 0.90
cli.pyFile · 0.90
thumbnails.pyFile · 0.90
globals.pyFile · 0.90
manual.pyFile · 0.90
viewport.pyFile · 0.90
interact.pyFile · 0.90
frame.pyFile · 0.90
control.pyFile · 0.90
frame.pyFile · 0.90

Calls

no outgoing calls

Tested by 1

test_get_module_objectsFunction · 0.72