Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

把Config的type字段默认类型由str改为None #1283

Merged
merged 1 commit into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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