Repository: kedro-org/kedro
File: kedro/framework/context/context.py (Python)

Code before:
        """
        return self._get_catalog()

    @property
    def params(self) -> dict[str, Any]:
        """Read-only property referring to Kedro's parameters for this context.

        Returns:
            Parameters defined in `parameters.yml` with the addition of any
                extra parameters passed at initialization.
        """
        try:
            raw_params = self.config_loader.get("parameters")
            # Convert raw_params to OmegaConf object if it's not already one
            params = OmegaConf.create(raw_params)
        except MissingConfigException as exc:
            warn(f"Parameters not found in your Kedro project config.\n{str(exc)}")
            params = OmegaConf.create()  # Create an empty OmegaConf object

        if self._extra_params:
            # Merge extra_params (already a dict) with loaded params (OmegaConf object)
            extra_params_conf = OmegaConf.create(self._extra_params)
            params = OmegaConf.merge(params, extra_params_conf)

        # Convert the OmegaConf object to a plain Python dictionary
        return OmegaConf.to_container(params, resolve=True)

    def _get_catalog(
        self,
        save_version: str = None,
        load_versions: dict[str, str] = None,
    ) -> DataCatalog:
        """A hook for changing the creation of a DataCatalog instance.

        Returns:
            DataCatalog defined in `catalog.yml`.
        Raises:
            KedroContextError: Incorrect ``DataCatalog`` registered for the project.

        """
        # '**/catalog*' reads modular pipeline configs
        conf_catalog = self.config_loader["catalog"]
        # turn relative paths in conf_catalog into absolute paths
        # before initializing the catalog
        conf_catalog = _convert_paths_to_absolute_posix(
            project_path=self.project_path, conf_dictionary=conf_catalog
        )
        conf_creds = self._get_config_credentials()

        catalog = settings.DATA_CATALOG_CLASS.from_config(
            catalog=conf_catalog,

Review comment (suggestion):
Is there a reason why this needs to be converted to an OmegaConf object? I think `OmegaConf.merge()` also works on plain dicts? I also don't think `resolve=True` is necessary, the `extra_params` shouldn't have any interpolation and `params` will already be resolved. 

Code after:

        return OmegaConf.to_container(params) if OmegaConf.is_config(params) else params

    def _get_catalog(
        self,
        save_version: str = None,
        load_versions: dict[str, str] = None,
    ) -> DataCatalog:
        """A hook for changing the creation of a DataCatalog instance.

        Returns:
            DataCatalog defined in `catalog.yml`.
        Raises:
            KedroContextError: Incorrect ``DataCatalog`` registered for the project.

        """
        # '**/catalog*' reads modular pipeline configs
        conf_catalog = self.config_loader["catalog"]
        # turn relative paths in conf_catalog into absolute paths
        # before initializing the catalog
        conf_catalog = _convert_paths_to_absolute_posix(
            project_path=self.project_path, conf_dictionary=conf_catalog
        )
        conf_creds = self._get_config_credentials()

        catalog = settings.DATA_CATALOG_CLASS.from_config(
            catalog=conf_catalog,
            credentials=conf_creds,
            load_versions=load_versions,
            save_version=save_version,
        )

        feed_dict = self._get_feed_dict()
        catalog.add_feed_dict(feed_dict)
        _validate_transcoded_datasets(catalog)
        self._hook_manager.hook.after_catalog_created(
            catalog=catalog,
            conf_catalog=conf_catalog,
            conf_creds=conf_creds,
            feed_dict=feed_dict,
            save_version=save_version,
            load_versions=load_versions,
        )
        return catalog

    def _get_feed_dict(self) -> dict[str, Any]:
        """Get parameters and return the feed dictionary."""
        params = self.params
        feed_dict = {"parameters": params}

        def _add_param_to_feed_dict(param_name, param_value):