(ctx: ClassDefContext)
| 15 | |
| 16 | |
| 17 | def add_overloaded_method_hook(ctx: ClassDefContext) -> None: |
| 18 | add_overloaded_method_to_class(ctx.api, ctx.cls, "method", _generate_method_specs(ctx)) |
| 19 | add_overloaded_method_to_class( |
| 20 | ctx.api, ctx.cls, "clsmethod", _generate_method_specs(ctx), is_classmethod=True |
| 21 | ) |
| 22 | add_overloaded_method_to_class( |
| 23 | ctx.api, ctx.cls, "stmethod", _generate_method_specs(ctx), is_staticmethod=True |
| 24 | ) |
| 25 | |
| 26 | |
| 27 | def _generate_method_specs(ctx: ClassDefContext) -> list[MethodSpec]: |
nothing calls this directly
no test coverage detected
searching dependent graphs…