MCPcopy Create free account
hub / github.com/Vchitect/Latte / get_top_level_function_name

Function get_top_level_function_name

tools/dnnlib/util.py:306–312  ·  view source on GitHub ↗

Return the fully-qualified name of a top-level function.

(obj: Any)

Source from the content-addressed store, hash-verified

304
305
306def get_top_level_function_name(obj: Any) -> str:
307 """Return the fully-qualified name of a top-level function."""
308 assert is_top_level_function(obj)
309 module = obj.__module__
310 if module == '__main__':
311 module = os.path.splitext(os.path.basename(sys.modules[module].__file__))[0]
312 return module + "." + obj.__name__
313
314
315# File system helpers

Callers

nothing calls this directly

Calls 1

is_top_level_functionFunction · 0.85

Tested by

no test coverage detected