config#

Handles plugin configuration functionality including:
  • Managing plugin-specific settings

  • Processing configuration data from various sources

  • Dynamically adding and removing plugin settings

  • Providing a standardized interface for plugins to access their configurations

Classes#

PluginConfig

Class used to hold settings for conda plugins.

class PluginConfig(data)#

Bases: conda.common.configuration.Configuration

Class used to hold settings for conda plugins.

The object created by this class should only be accessed via conda.base.context.Context.plugins.

When this class is updated via the add_plugin_setting() function it adds new setting properties which can be accessed later via the context object.

We currently call that function in conda.plugins.manager.CondaPluginManager.load_settings(). because CondaPluginManager has access to all registered plugin settings via the settings plugin hook.

property raw_data: dict[pathlib.Path, dict[str, conda.common.configuration.RawParameter]]#

This is used to move everything under the key "plugins" from the provided dictionary to the top level of the returned dictionary. The returned dictionary is then passed to PluginConfig.

property category_map: dict[str, tuple[str, Ellipsis]]#
parameter_names: tuple[str, Ellipsis] = ()#
classmethod add_plugin_setting(name: str, parameter: conda.common.configuration.Parameter, aliases: tuple[str, Ellipsis] = ())#

Adds a setting to the PluginConfig class

classmethod remove_all_plugin_settings() None#

Removes all attached settings from the PluginConfig class

get_descriptions() dict[str, str]#
describe_parameter(parameter_name) dict[str, Any]#

Returns the description of a parameter.

We add to this method in order to change the "name" key that is returned to prepend "plugins." to it.