(self, fullname: str)
| 578 | return names |
| 579 | |
| 580 | def normalize_function_kind(self, fullname: str) -> None: |
| 581 | # Fetch the method name and possibly class. |
| 582 | fields = fullname.split('.') |
| 583 | name = fields.pop() |
| 584 | _, cls = self.clinic._module_and_class(fields) |
| 585 | |
| 586 | # Check special method requirements. |
| 587 | if name in unsupported_special_methods: |
| 588 | fail(f"{name!r} is a special method and cannot be converted to Argument Clinic!") |
| 589 | if name == '__init__' and (self.kind is not CALLABLE or not cls): |
| 590 | fail(f"{name!r} must be a normal method; got '{self.kind}'!") |
| 591 | if name == '__new__' and (self.kind is not CLASS_METHOD or not cls): |
| 592 | fail("'__new__' must be a class method!") |
| 593 | if self.kind in {GETTER, SETTER} and not cls: |
| 594 | fail("@getter and @setter must be methods") |
| 595 | |
| 596 | # Normalise self.kind. |
| 597 | if name == '__new__': |
| 598 | self.kind = METHOD_NEW |
| 599 | elif name == '__init__': |
| 600 | self.kind = METHOD_INIT |
| 601 | |
| 602 | def resolve_return_converter( |
| 603 | self, full_name: str, forced_converter: str |
no test coverage detected