MCPcopy Create free account
hub / github.com/NVIDIA/DALI / module_functions

Function module_functions

dali/test/python/test_utils.py:735–761  ·  view source on GitHub ↗
(
    cls, prefix="", remove_prefix="", check_non_module=False, allowed_private_modules=[]
)

Source from the content-addressed store, hash-verified

733
734
735def module_functions(
736 cls, prefix="", remove_prefix="", check_non_module=False, allowed_private_modules=[]
737):
738 res = []
739 if hasattr(cls, "_schema_name"):
740 prefix = prefix.replace(remove_prefix, "")
741 prefix = prefix.lstrip(".")
742 if len(prefix):
743 prefix += "."
744 else:
745 prefix = ""
746 res.append(prefix + cls.__name__)
747 elif check_non_module or inspect.ismodule(cls):
748 for c_name, c in inspect.getmembers(cls):
749
750 def public_or_allowed(c_name):
751 return not c_name.startswith("_") or c_name in allowed_private_modules
752
753 if public_or_allowed(c_name) and c_name not in sys.builtin_module_names:
754 res += module_functions(
755 c,
756 cls.__name__,
757 remove_prefix=remove_prefix,
758 check_non_module=check_non_module,
759 allowed_private_modules=allowed_private_modules,
760 )
761 return res
762
763
764def get_files(path, ext):

Callers 3

test_coverageFunction · 0.90
test_coverageFunction · 0.90
test_coverageFunction · 0.90

Calls 2

public_or_allowedFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected