mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
把Config的type字段默认类型由str改为None
This commit is contained in:
parent
6826c10a09
commit
33a0477fab
@ -117,7 +117,7 @@ def init_plugin_info():
|
||||
config.get("value"),
|
||||
help_=config.get("help"),
|
||||
default_value=config.get("default_value"),
|
||||
type=config.get("type") or str,
|
||||
type=config.get("type"),
|
||||
)
|
||||
plugin_configs = plugin_cfg.configs
|
||||
plugin_status = plugins_manager.get(plugin_model)
|
||||
|
||||
@ -50,7 +50,7 @@ def init_plugins_config():
|
||||
help_=plugin_configs[key].get("help"),
|
||||
default_value=plugin_configs[key].get("default_value"),
|
||||
_override=True,
|
||||
type=plugin_configs[key].get("type") or str,
|
||||
type=plugin_configs[key].get("type"),
|
||||
)
|
||||
else:
|
||||
config = plugin_configs[key]
|
||||
@ -62,7 +62,7 @@ def init_plugins_config():
|
||||
help_=config.help,
|
||||
default_value=config.default_value,
|
||||
_override=True,
|
||||
type=config.type or str,
|
||||
type=config.type,
|
||||
)
|
||||
elif plugin_configs := _data.get(matcher.plugin_name):
|
||||
for key in plugin_configs.configs:
|
||||
|
||||
@ -84,7 +84,7 @@ class ConfigsManager:
|
||||
name: Optional[str] = None,
|
||||
help_: Optional[str] = None,
|
||||
default_value: Optional[Any] = None,
|
||||
type: Optional[Type] = str,
|
||||
type: Optional[Type] = None,
|
||||
arg_parser: Optional[Callable] = None,
|
||||
_override: bool = False,
|
||||
):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user