(self, func: Function)
| 730 | self.next(self.state_parameters_start) |
| 731 | |
| 732 | def add_function(self, func: Function) -> None: |
| 733 | # Insert a self converter automatically. |
| 734 | tp, name = correct_name_for_self(func) |
| 735 | if func.cls and tp == "PyObject *": |
| 736 | func.self_converter = self_converter(name, name, func, |
| 737 | type=func.cls.typedef) |
| 738 | else: |
| 739 | func.self_converter = self_converter(name, name, func) |
| 740 | func.parameters[name] = Parameter( |
| 741 | name, |
| 742 | inspect.Parameter.POSITIONAL_ONLY, |
| 743 | function=func, |
| 744 | converter=func.self_converter |
| 745 | ) |
| 746 | |
| 747 | self.block.signatures.append(func) |
| 748 | self.function = func |
| 749 | (func.cls or func.module).functions.append(func) |
| 750 | |
| 751 | # Now entering the parameters section. The rules, formally stated: |
| 752 | # |
no test coverage detected