mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-01-31 20:03:36 +00:00
Fix hookify plugin import error: No module named 'hookify'
The hook scripts used absolute imports like `from hookify.core.config_loader` but when installed, the plugin lives in a cache directory with a hash name, not in a directory named `hookify/`. Python couldn't resolve the package. Changed to local imports (`from core.X`) which work because PLUGIN_ROOT is added to sys.path. Also simplified the sys.path setup. Fixes: https://github.com/anthropics/claude-code/issues/14267 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ from functools import lru_cache
|
||||
from typing import List, Dict, Any, Optional
|
||||
|
||||
# Import from local module
|
||||
from hookify.core.config_loader import Rule, Condition
|
||||
from core.config_loader import Rule, Condition
|
||||
|
||||
|
||||
# Cache compiled regexes (max 128 patterns)
|
||||
@@ -275,7 +275,7 @@ class RuleEngine:
|
||||
|
||||
# For testing
|
||||
if __name__ == '__main__':
|
||||
from hookify.core.config_loader import Condition, Rule
|
||||
from core.config_loader import Condition, Rule
|
||||
|
||||
# Test rule evaluation
|
||||
rule = Rule(
|
||||
|
||||
Reference in New Issue
Block a user