Skip to content

Repository

zenml.repository

Deprecated Repository implementation.

Repository

DEPRECATED: Implementation of the ZenML repository instance.

Source code in zenml/repository.py
class Repository:
    """DEPRECATED: Implementation of the ZenML repository instance."""

    def __new__(cls, *args: Any, **kwargs: Any) -> "Repository":
        """Returns the Client class due to deprecation.

        Args:
            *args: Arguments.
            **kwargs: Keyword arguments.

        Returns:
            Client: The Client class.
        """
        warn(
            f"{cls.__name__} has been renamed to {Client.__name__}, "
            f"the alias will be removed in the future.",
            DeprecationWarning,
            stacklevel=2,
        )
        return cast(Repository, Client(*args, **kwargs))

__new__(cls, *args, **kwargs) special staticmethod

Returns the Client class due to deprecation.

Parameters:

Name Type Description Default
*args Any

Arguments.

()
**kwargs Any

Keyword arguments.

{}

Returns:

Type Description
Client

The Client class.

Source code in zenml/repository.py
def __new__(cls, *args: Any, **kwargs: Any) -> "Repository":
    """Returns the Client class due to deprecation.

    Args:
        *args: Arguments.
        **kwargs: Keyword arguments.

    Returns:
        Client: The Client class.
    """
    warn(
        f"{cls.__name__} has been renamed to {Client.__name__}, "
        f"the alias will be removed in the future.",
        DeprecationWarning,
        stacklevel=2,
    )
    return cast(Repository, Client(*args, **kwargs))