update and cleanup repo
This commit is contained in:
+5
-14
@@ -323,20 +323,11 @@ class Provider(ABC):
|
||||
def plugin_config_root(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.config, dict):
|
||||
return {}
|
||||
# Check plugin/provider section first (preferred new format)
|
||||
for section in ("plugin", "provider"):
|
||||
section_cfg = self.config.get(section)
|
||||
if isinstance(section_cfg, dict):
|
||||
entry = section_cfg.get(self.plugin_config_key())
|
||||
if isinstance(entry, dict):
|
||||
return dict(entry)
|
||||
# Backward compat: fall back to store section.
|
||||
# store config uses {type: {instance: {key: val}}} — one level deeper.
|
||||
store_cfg = self.config.get("store")
|
||||
if isinstance(store_cfg, dict):
|
||||
store_entries = store_cfg.get(self.plugin_config_key())
|
||||
if isinstance(store_entries, dict):
|
||||
return dict(store_entries)
|
||||
section_cfg = self.config.get("plugin")
|
||||
if isinstance(section_cfg, dict):
|
||||
entry = section_cfg.get(self.plugin_config_key())
|
||||
if isinstance(entry, dict):
|
||||
return dict(entry)
|
||||
return {}
|
||||
|
||||
def plugin_instance_configs(self) -> Dict[str, Dict[str, Any]]:
|
||||
|
||||
Reference in New Issue
Block a user