(symbol, method)
| 100 | |
| 101 | # Find a method by wallking the inheritance hierarchy of a type: |
| 102 | def find_method(symbol, method): |
| 103 | hierarchy = inspect.getmro(symbol) |
| 104 | for ancestor in hierarchy: |
| 105 | if method in vars(ancestor): |
| 106 | return vars(ancestor)[method] |
| 107 | |
| 108 | assert False, f"Could not find method: {method} in the inheritance hierarcy of: {symbol}" |
| 109 | |
| 110 | def export_impl(func_or_cls): |
| 111 | _add_to_all(func_or_cls.__name__, module) |
no outgoing calls
no test coverage detected