Enable all hooks for an extension. Args: extension_id: Extension ID
(self, extension_id: str)
| 3469 | } |
| 3470 | |
| 3471 | def enable_hooks(self, extension_id: str): |
| 3472 | """Enable all hooks for an extension. |
| 3473 | |
| 3474 | Args: |
| 3475 | extension_id: Extension ID |
| 3476 | """ |
| 3477 | config = self.get_project_config() |
| 3478 | |
| 3479 | if "hooks" not in config: |
| 3480 | return |
| 3481 | |
| 3482 | # Enable all hooks for this extension |
| 3483 | for hook_name in config["hooks"]: |
| 3484 | for hook in config["hooks"][hook_name]: |
| 3485 | if hook.get("extension") == extension_id: |
| 3486 | hook["enabled"] = True |
| 3487 | |
| 3488 | self.save_project_config(config) |
| 3489 | |
| 3490 | def disable_hooks(self, extension_id: str): |
| 3491 | """Disable all hooks for an extension. |
nothing calls this directly
no test coverage detected