Skip to content

Commit

Permalink
perf(datasets): lazily load datasets in init files (holoviews)
Browse files Browse the repository at this point in the history
Signed-off-by: Deepyaman Datta <deepyaman.datta@utexas.edu>
  • Loading branch information
deepyaman committed Jul 24, 2023
1 parent 89a3f54 commit c86de49
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions kedro-datasets/kedro_datasets/holoviews/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
"""``AbstractDataSet`` implementation to save Holoviews objects as image files."""
from typing import Any

__all__ = ["HoloviewsWriter"]
import lazy_loader as lazy

from contextlib import suppress
# https://github.com/pylint-dev/pylint/issues/4300#issuecomment-1043601901
HoloviewsWriter: Any

with suppress(ImportError):
from .holoviews_writer import HoloviewsWriter
__getattr__, __dir__, __all__ = lazy.attach(
__name__, submod_attrs={"holoviews_writer": ["HoloviewsWriter"]}
)

0 comments on commit c86de49

Please sign in to comment.