22 lines
787 B
Python
22 lines
787 B
Python
"""抖音操作注册包。import 触发各操作注册。
|
||
|
||
加新抖音操作:新建 xxx.py,在下面加一行 from . import xxx。
|
||
注意:必须先从 base 导入 ACTIONS,再导入各操作模块,否则循环导入。
|
||
"""
|
||
# 先初始化注册表(base.py 里定义了 ACTIONS = create_action_registry())
|
||
from .base import (
|
||
BaseAction, register_action, create_action_registry,
|
||
list_actions, get_action, should_trigger,
|
||
ACTIONS,
|
||
list_action_types, get_action_class,
|
||
)
|
||
|
||
# 再导入各操作模块,触发 @register_action(ACTIONS) 注册
|
||
from . import like # noqa: F401
|
||
|
||
__all__ = [
|
||
"BaseAction", "register_action", "create_action_registry",
|
||
"list_actions", "get_action", "should_trigger",
|
||
"ACTIONS", "list_action_types", "get_action_class",
|
||
]
|