From 833d29b101e473fe446ef6f89e737d358bbd093f Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Sat, 29 Jul 2023 16:55:01 +0800 Subject: [PATCH] typo: enable->enabled --- pkg/plugin/settings.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/plugin/settings.py b/pkg/plugin/settings.py index beb41684..92fcfe77 100644 --- a/pkg/plugin/settings.py +++ b/pkg/plugin/settings.py @@ -10,7 +10,7 @@ def wrapper_dict_from_runtime_context() -> dict: settings = { "order": [], "functions": { - "enable": host.__enable_content_functions__ + "enabled": host.__enable_content_functions__ } } @@ -26,9 +26,9 @@ def apply_settings(settings: dict): host.__plugins_order__ = settings["order"] if "functions" in settings: - if "enable" in settings["functions"]: - host.__enable_content_functions__ = settings["functions"]["enable"] - # logging.debug("set content function enable: {}".format(host.__enable_content_functions__)) + if "enabled" in settings["functions"]: + host.__enable_content_functions__ = settings["functions"]["enabled"] + # logging.debug("set content function enabled: {}".format(host.__enable_content_functions__)) def dump_settings(): @@ -88,14 +88,14 @@ def load_settings(): if "functions" not in settings: settings["functions"] = { - "enable": host.__enable_content_functions__ + "enabled": host.__enable_content_functions__ } settings_modified = True - elif "enable" not in settings["functions"]: - settings["functions"]["enable"] = host.__enable_content_functions__ + elif "enabled" not in settings["functions"]: + settings["functions"]["enabled"] = host.__enable_content_functions__ settings_modified = True - logging.info("已全局{}内容函数。".format("启用" if settings["functions"]["enable"] else "禁用")) + logging.info("已全局{}内容函数。".format("启用" if settings["functions"]["enabled"] else "禁用")) apply_settings(settings)