Skip to content

Commit

Permalink
Merge pull request #1283 from LambdaYH/main
Browse files Browse the repository at this point in the history
把Config的type字段默认类型由str改为None
  • Loading branch information
HibiKier authored Feb 28, 2023
2 parents 6826c10 + 33a0477 commit 401029b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion basic_plugins/init_plugin_config/init_plugin_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions basic_plugins/init_plugin_config/init_plugins_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion configs/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def add_plugin_config(
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,
):
Expand Down

0 comments on commit 401029b

Please sign in to comment.