warn if 'settings_category' is not filled but settings are received

This commit is contained in:
Jakub Trllo 2025-07-25 16:35:59 +02:00
parent 32ea97af45
commit 2e345fb297

View file

@ -354,12 +354,17 @@ def get_plugin_settings(plugin, project_settings, log, category=None):
# Use project settings based on a category name
if category:
try:
return (
output = (
project_settings
[category]
["publish"]
[plugin.__name__]
)
warnings.warn(
f"Please fill 'settings_category' for plugin '{plugin.__name__}'.",
DeprecationWarning
)
return output
except KeyError:
pass
@ -384,12 +389,17 @@ def get_plugin_settings(plugin, project_settings, log, category=None):
category_from_file = "core"
try:
return (
output = (
project_settings
[category_from_file]
[plugin_kind]
[plugin.__name__]
)
warnings.warn(
f"Please fill 'settings_category' for plugin '{plugin.__name__}'.",
DeprecationWarning
)
return output
except KeyError:
pass
return {}