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

Method in_values

_plotly_utils/basevalidators.py:591–606  ·  view source on GitHub ↗

Return whether a value matches one of the enumeration options

(self, e)

Source from the content-addressed store, hash-verified

589 return desc
590
591 def in_values(self, e):
592 """
593 Return whether a value matches one of the enumeration options
594 """
595 is_str = isinstance(e, str)
596 for v, regex in zip(self.values, self.val_regexs):
597 if is_str and regex:
598 in_values = fullmatch(regex, e) is not None
599 # in_values = regex.fullmatch(e) is not None
600 else:
601 in_values = e == v
602
603 if in_values:
604 return True
605
606 return False
607
608 def validate_coerce(self, v):
609 if is_none_or_typed_array_spec(v):

Callers 1

validate_coerceMethod · 0.95

Calls 1

fullmatchFunction · 0.85

Tested by

no test coverage detected