(cls)
| 68 | |
| 69 | def use_cpp_class(cpp_cls): |
| 70 | def wrapper(cls): |
| 71 | exclude_methods = {"__module__", "__dict__", "__doc__"} |
| 72 | |
| 73 | for attr_name, attr in cls.__dict__.items(): |
| 74 | if attr_name not in exclude_methods and not hasattr( |
| 75 | _unwrap_func(attr), "_use_cpp" |
| 76 | ): |
| 77 | setattr(cpp_cls, attr_name, attr) |
| 78 | |
| 79 | cpp_cls.__doc__ = cls.__doc__ |
| 80 | |
| 81 | return cpp_cls |
| 82 | |
| 83 | return wrapper |
| 84 |
no test coverage detected