Files
auto_control/tasks/douyin/actions/__init__.py
T

22 lines
787 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""抖音操作注册包。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",
]