Repository: kedro-org/kedro
File: kedro/io/kedro_data_catalog.py (Python)

Code before:
            )
        ]
        if missing_keys:
            raise DatasetNotFoundError(
                f"'load_versions' keys [{', '.join(sorted(missing_keys))}] "
                f"are not found in the catalog."
            )

        return cls(
            load_versions=load_versions,
            save_version=save_version,
            config_resolver=config_resolver,
        )

    def to_config(
        self,
    ) -> tuple[
        dict[str, dict[str, Any]],
        dict[str, dict[str, Any]],
        dict[str, str | None],
        str | None,
    ]:
        """Converts the `KedroDataCatalog` instance into a configuration format suitable for
        serialization. This includes datasets, credentials, and versioning information.

        This method is only applicabe to catalogs that contain datasets initialized with static, primitive
        parameters. For example, it will work fine if one passes credentials as dictionary to
        `GBQQueryDataset` but not as `google.auth.credentials.Credentials` object. See
        https://github.com/kedro-org/kedro-plugins/issues/950 for the details.

        Returns:
            A tuple containing:
                catalog: A dictionary mapping dataset names to their unresolved configurations,
                    excluding in-memory datasets.
                credentials: A dictionary of unresolved credentials extracted from dataset configurations.
                load_versions: A dictionary mapping dataset names to specific versions to be loaded,
                    or `None` if no version is set.
                save_version: A global version identifier for saving datasets, or `None` if not specified.
        Example:
        ::

            >>> from kedro.io import KedroDataCatalog
            >>> from kedro_datasets.pandas import CSVDataset
            >>>
            >>> cars = CSVDataset(
            >>>     filepath="cars.csv",
            >>>     load_args=None,
            >>>     save_args={"index": False}
            >>> )
            >>> catalog = KedroDataCatalog(datasets={'cars': cars})
            >>>

Review comment (suggestion):
```suggestion
        This method is only applicable to catalogs that contain datasets initialized with static, primitive
```

Code after:
            )
        ]
        if missing_keys:
            raise DatasetNotFoundError(
                f"'load_versions' keys [{', '.join(sorted(missing_keys))}] "
                f"are not found in the catalog."
            )

        return cls(
            load_versions=load_versions,
            save_version=save_version,
            config_resolver=config_resolver,
        )

    def to_config(
        self,
    ) -> tuple[
        dict[str, dict[str, Any]],
        dict[str, dict[str, Any]],
        dict[str, str | None],
        str | None,
    ]:
        """Converts the `KedroDataCatalog` instance into a configuration format suitable for
        serialization. This includes datasets, credentials, and versioning information.

        This method is only applicable to catalogs that contain datasets initialized with static, primitive
        parameters. For example, it will work fine if one passes credentials as dictionary to
        `GBQQueryDataset` but not as `google.auth.credentials.Credentials` object. See
        https://github.com/kedro-org/kedro-plugins/issues/950 for the details.

        Returns:
            A tuple containing:
                catalog: A dictionary mapping dataset names to their unresolved configurations,
                    excluding in-memory datasets.
                credentials: A dictionary of unresolved credentials extracted from dataset configurations.
                load_versions: A dictionary mapping dataset names to specific versions to be loaded,
                    or `None` if no version is set.
                save_version: A global version identifier for saving datasets, or `None` if not specified.
        Example:
        ::

            >>> from kedro.io import KedroDataCatalog
            >>> from kedro_datasets.pandas import CSVDataset
            >>>
            >>> cars = CSVDataset(
            >>>     filepath="cars.csv",
            >>>     load_args=None,
            >>>     save_args={"index": False}
            >>> )
            >>> catalog = KedroDataCatalog(datasets={'cars': cars})
            >>>