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

Method validate_coerce

_plotly_utils/basevalidators.py:683–694  ·  view source on GitHub ↗
(self, v)

Source from the content-addressed store, hash-verified

681 as a plotly.grid_objs.Column object""".format(plotly_name=self.plotly_name)
682
683 def validate_coerce(self, v):
684 if is_none_or_typed_array_spec(v):
685 pass
686 elif isinstance(v, str):
687 pass
688 elif self.chart_studio and isinstance(v, self.chart_studio.grid_objs.Column):
689 # Convert to id string
690 v = v.id
691 else:
692 self.raise_invalid_val(v)
693
694 return v
695
696
697class NumberValidator(BaseValidator):

Callers 15

validate_coerceMethod · 0.45
validate_coerceMethod · 0.45
validate_coerceMethod · 0.45
__init__Method · 0.45
add_tracesMethod · 0.45
layoutMethod · 0.45
framesMethod · 0.45
batch_animateMethod · 0.45
_set_propMethod · 0.45

Calls 2

raise_invalid_valMethod · 0.80

Tested by 15

test_acceptanceFunction · 0.36
test_acceptance_emptyFunction · 0.36
test_acceptance_dictFunction · 0.36
test_rejection_typeFunction · 0.36
test_rejection_elementFunction · 0.36
test_rejection_valueFunction · 0.36
test_skip_invalidFunction · 0.36
test_rejection_by_typeFunction · 0.36
test_acceptanceFunction · 0.36
test_rejectionFunction · 0.36