MCPcopy Index your code
hub / github.com/github/spec-kit / disable_hooks

Method disable_hooks

src/specify_cli/extensions/__init__.py:3490–3507  ·  view source on GitHub ↗

Disable all hooks for an extension. Args: extension_id: Extension ID

(self, extension_id: str)

Source from the content-addressed store, hash-verified

3488 self.save_project_config(config)
3489
3490 def disable_hooks(self, extension_id: str):
3491 """Disable all hooks for an extension.
3492
3493 Args:
3494 extension_id: Extension ID
3495 """
3496 config = self.get_project_config()
3497
3498 if "hooks" not in config:
3499 return
3500
3501 # Disable all hooks for this extension
3502 for hook_name in config["hooks"]:
3503 for hook in config["hooks"][hook_name]:
3504 if hook.get("extension") == extension_id:
3505 hook["enabled"] = False
3506
3507 self.save_project_config(config)

Callers

nothing calls this directly

Calls 3

get_project_configMethod · 0.95
save_project_configMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected