Skip to content

Commit 665595d

Browse files
bmaranvillegvwilson
authored andcommitted
use validators from ValidatorCache
1 parent 3fd1cfd commit 665595d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plotly/figure_factory/_annotated_heatmap.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
from plotly import exceptions, optional_imports
33
from plotly.figure_factory import utils
44
from plotly.graph_objs import graph_objs
5-
from plotly.validators.heatmap import ColorscaleValidator
5+
from plotly.validator_cache import ValidatorCache
6+
# from _plotly_utils.basevalidators import ColorscaleValidator
67

78
# Optional imports, may be None for users that only use our core functionality.
89
np = optional_imports.get_module("numpy")
@@ -102,7 +103,7 @@ def create_annotated_heatmap(
102103
validate_annotated_heatmap(z, x, y, annotation_text)
103104

104105
# validate colorscale
105-
colorscale_validator = ColorscaleValidator()
106+
colorscale_validator = ValidatorCache.get_validator("layout", "colorscale")
106107
colorscale = colorscale_validator.validate_coerce(colorscale)
107108

108109
annotations = _AnnotatedHeatmap(

0 commit comments

Comments
 (0)