MCPcopy Index your code
hub / github.com/plotly/plotly.py / build_data_validator_params

Function build_data_validator_params

codegen/validators.py:86–109  ·  view source on GitHub ↗

Build a dict of constructor params for the DataValidator. (This is the validator that inputs a list of traces) Parameters ---------- base_trace_node : PlotlyNode PlotlyNode that is the parent of all of the individual trace nodes Returns ------- dict M

(base_trace_node: TraceNode)

Source from the content-addressed store, hash-verified

84
85
86def build_data_validator_params(base_trace_node: TraceNode):
87 """
88 Build a dict of constructor params for the DataValidator.
89 (This is the validator that inputs a list of traces)
90 Parameters
91 ----------
92 base_trace_node : PlotlyNode
93 PlotlyNode that is the parent of all of the individual trace nodes
94 Returns
95 -------
96 dict
97 Mapping from property name to repr-string of property value.
98 """
99 # Get list of trace nodes
100 tracetype_nodes = base_trace_node.child_compound_datatypes
101 class_strs_map = dict(
102 [(node.name_property, node.name_datatype_class) for node in tracetype_nodes]
103 )
104
105 return {
106 "class_strs_map": class_strs_map,
107 "plotly_name": "data",
108 "parent_name": "",
109 }
110
111
112def get_data_validator_instance(base_trace_node: TraceNode):

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected