diff --git a/kedro-datasets/kedro_datasets/plotly/__init__.py b/kedro-datasets/kedro_datasets/plotly/__init__.py index f864ea6db..6df4408d7 100644 --- a/kedro-datasets/kedro_datasets/plotly/__init__.py +++ b/kedro-datasets/kedro_datasets/plotly/__init__.py @@ -1,11 +1,14 @@ """``AbstractDataSet`` implementations to load/save a plotly figure from/to a JSON file.""" +from typing import Any -__all__ = ["PlotlyDataSet", "JSONDataSet"] +import lazy_loader as lazy -from contextlib import suppress +# https://github.com/pylint-dev/pylint/issues/4300#issuecomment-1043601901 +JSONDataSet: Any +PlotlyDataSet: Any -with suppress(ImportError): - from .plotly_dataset import PlotlyDataSet -with suppress(ImportError): - from .json_dataset import JSONDataSet +__getattr__, __dir__, __all__ = lazy.attach( + __name__, + submod_attrs={"json_dataset": ["JSONDataSet"], "plotly_dataset": ["PlotlyDataSet"]}, +)