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

Method validate_coerce

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

Source from the content-addressed store, hash-verified

654 return desc
655
656 def validate_coerce(self, v):
657 if is_none_or_typed_array_spec(v):
658 pass
659 elif self.array_ok and is_simple_array(v):
660 invalid_els = [e for e in v if not isinstance(e, bool)]
661 if invalid_els:
662 self.raise_invalid_elements(invalid_els[:10])
663 v = to_scalar_or_list(v)
664 elif not isinstance(v, bool):
665 self.raise_invalid_val(v)
666
667 return v
668
669
670class SrcValidator(BaseValidator):

Callers

nothing calls this directly

Calls 5

is_simple_arrayFunction · 0.85
to_scalar_or_listFunction · 0.85
raise_invalid_valMethod · 0.80

Tested by

no test coverage detected