MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / validate_sketch

Function validate_sketch

lib/matplotlib/rcsetup.py:625–636  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

623
624
625def validate_sketch(s):
626
627 if isinstance(s, str):
628 s = s.lower().strip()
629 if s.startswith("(") and s.endswith(")"):
630 s = s[1:-1]
631 if s == 'none' or s is None:
632 return None
633 try:
634 return tuple(_listify_validator(validate_float, n=3)(s))
635 except ValueError as exc:
636 raise ValueError("Expected a (scale, length, randomness) tuple") from exc
637
638
639def _validate_greaterthan_minushalf(s):

Callers 2

test_validate_sketchFunction · 0.90

Calls 1

_listify_validatorFunction · 0.85

Tested by 2

test_validate_sketchFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…