(self, prefix, cls)
| 282 | return meth if meth else self.match_any |
| 283 | |
| 284 | def _get_method(self, prefix, cls): |
| 285 | name = cls.__name__ |
| 286 | if cls.__module__ != "builtins": |
| 287 | name = f"{cls.__module__}.{name}" |
| 288 | |
| 289 | parts = name.split(".") |
| 290 | for i in range(len(parts) - 1, -1, -1): |
| 291 | if meth := getattr(self, f"{prefix}_{'_'.join(parts[-(i + 1):])}", None): |
| 292 | return meth |
| 293 | |
| 294 | return None |
| 295 | |
| 296 | def make(self, spec): |
| 297 | # spec can be a type or a tuple (type, options) |
no test coverage detected