Removes all methods added by importApi() from a target class. Args: target: The class to remove from.
(target: type[Any])
| 251 | |
| 252 | @staticmethod |
| 253 | def clearApi(target: type[Any]) -> None: |
| 254 | """Removes all methods added by importApi() from a target class. |
| 255 | |
| 256 | Args: |
| 257 | target: The class to remove from. |
| 258 | """ |
| 259 | for attr_name in dir(target): |
| 260 | attr_value = getattr(target, attr_name) |
| 261 | if callable(attr_value) and hasattr(attr_value, 'signature'): |
| 262 | delattr(target, attr_name) |