Repository: kedro-org/kedro
File: kedro/config/omegaconf_config.py (Python)

Code before:
            for file, config in config_per_file.items()
        }
        aggregate_config = config_per_file.values()
        self._check_duplicates(seen_file_to_keys)

        if not aggregate_config:
            return {}

        if key == "parameters":
            # Merge with runtime parameters only for "parameters"
            return OmegaConf.to_container(
                OmegaConf.merge(*aggregate_config, self.runtime_params), resolve=True
            )

        return {
            k: v
            for k, v in OmegaConf.to_container(
                OmegaConf.merge(*aggregate_config), resolve=True
            ).items()
            if not k.startswith("_")
        }

    def _get_all_keys(self, cfg: dict, parent_key: str = "") -> set[str]:
        keys: set[str] = set()

        for k, v in cfg.items():
            k_str = str(k)
            full_key = f"{parent_key}.{k_str}" if parent_key else k_str
            if isinstance(v, dict):
                keys.update(self._get_all_keys(v, full_key))
            else:
                keys.add(full_key)
        return keys

    def _is_valid_config_path(self, path: Path) -> bool:
        """Check if given path is a file path and file type is yaml or json."""
        posix_path = path.as_posix()
        return self._fs.isfile(str(posix_path)) and path.suffix in [
            ".yml",
            ".yaml",
            ".json",
        ]

    def _register_globals_resolver(self) -> None:
        """Register the globals resolver"""
        OmegaConf.register_new_resolver(
            "globals",
            self._get_globals_value,
            replace=True,
        )


Review comment (suggestion):
Can you use more descriptive variable names? In the Kedro codebase we aim to keep code as readable and understandable as possible, so instead of generic names like `k` and `v` and abbreviations it's preferred to name things explicitly. 

Code after:
        self._check_duplicates(key, config_per_file)

        if not aggregate_config:
            return {}

        if key == "parameters":
            # Merge with runtime parameters only for "parameters"
            return OmegaConf.to_container(
                OmegaConf.merge(*aggregate_config, self.runtime_params), resolve=True
            )

        return {
            k: v
            for k, v in OmegaConf.to_container(
                OmegaConf.merge(*aggregate_config), resolve=True
            ).items()
            if not k.startswith("_")
        }

    def _get_all_keys(self, cfg: Any, parent_key: str = "") -> set[str]:
        keys: set[str] = set()

        for key, value in cfg.items():
            full_key = f"{parent_key}.{key}" if parent_key else key
            if isinstance(value, dict):
                keys.update(self._get_all_keys(value, full_key))
            else:
                keys.add(full_key)
        return keys

    def _is_valid_config_path(self, path: Path) -> bool:
        """Check if given path is a file path and file type is yaml or json."""
        posix_path = path.as_posix()
        return self._fs.isfile(str(posix_path)) and path.suffix in [
            ".yml",
            ".yaml",
            ".json",
        ]

    def _register_globals_resolver(self) -> None:
        """Register the globals resolver"""
        OmegaConf.register_new_resolver(
            "globals",
            self._get_globals_value,
            replace=True,
        )

    def _register_runtime_params_resolver(self) -> None:
        OmegaConf.register_new_resolver(
            "runtime_params",
            self._get_runtime_value,