(
cls, prefix="", remove_prefix="", check_non_module=False, allowed_private_modules=[]
)
| 733 | |
| 734 | |
| 735 | def 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 | |
| 764 | def get_files(path, ext): |
no test coverage detected