(self, class_info: ClassInfo, name: str, obj: object)
| 546 | return inspect.isfunction(obj) |
| 547 | |
| 548 | def is_method(self, class_info: ClassInfo, name: str, obj: object) -> bool: |
| 549 | if self.is_c_module: |
| 550 | return inspect.ismethoddescriptor(obj) or type(obj) in ( |
| 551 | type(str.index), |
| 552 | type(str.__add__), |
| 553 | type(str.__new__), |
| 554 | ) |
| 555 | else: |
| 556 | # this is valid because it is only called on members of a class |
| 557 | return inspect.isfunction(obj) |
| 558 | |
| 559 | def is_classmethod(self, class_info: ClassInfo, name: str, obj: object) -> bool: |
| 560 | if self.is_c_module: |
no test coverage detected