@@ -468,7 +468,11 @@ class is a subclass of both BaseFigure and widgets.DOMWidget.
468
468
if a property in the specification of data, layout, or frames
469
469
is invalid AND skip_invalid is False
470
470
"""
471
- from .validators import DataValidator , LayoutValidator , FramesValidator
471
+ from .validator_cache import ValidatorCache
472
+ DataValidator = ValidatorCache .get_validator ("" , "data" )
473
+ FramesValidator = ValidatorCache .get_validator ("" , "frames" )
474
+ LayoutValidator = ValidatorCache .get_validator ("" , "layout" )
475
+ # from .validators import DataValidator, LayoutValidator, FramesValidator
472
476
473
477
super (BaseFigure , self ).__init__ ()
474
478
@@ -563,7 +567,7 @@ class is a subclass of both BaseFigure and widgets.DOMWidget.
563
567
# ------
564
568
# ### Construct layout validator ###
565
569
# This is the validator that handles importing Layout objects
566
- self ._layout_validator = LayoutValidator ()
570
+ self ._layout_validator = LayoutValidator
567
571
568
572
# ### Import Layout ###
569
573
self ._layout_obj = self ._layout_validator .validate_coerce (
@@ -598,7 +602,7 @@ class is a subclass of both BaseFigure and widgets.DOMWidget.
598
602
# ### Construct frames validator ###
599
603
# This is the validator that handles importing sequences of frame
600
604
# objects
601
- self ._frames_validator = FramesValidator ()
605
+ self ._frames_validator = FramesValidator
602
606
603
607
# ### Import frames ###
604
608
self ._frame_objs = self ._frames_validator .validate_coerce (
0 commit comments