Skip to content

Commit af43f68

Browse files
bmaranvillegvwilson
authored andcommitted
use DataValidator from ValidatorCache
1 parent 665595d commit af43f68

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plotly/_subplots.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,9 +1062,11 @@ def _init_subplot_domain(x_domain, y_domain):
10621062

10631063

10641064
def _subplot_type_for_trace_type(trace_type):
1065-
from plotly.validators import DataValidator
1065+
from plotly.validator_cache import ValidatorCache
1066+
DataValidator = ValidatorCache.get_validator("", "data")
1067+
# from plotly.validators import DataValidator
10661068

1067-
trace_validator = DataValidator()
1069+
trace_validator = DataValidator
10681070
if trace_type in trace_validator.class_strs_map:
10691071
# subplot_type is a trace name, find the subplot type for trace
10701072
trace = trace_validator.validate_coerce([{"type": trace_type}])[0]

0 commit comments

Comments
 (0)