(s)
| 623 | |
| 624 | |
| 625 | def 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 | |
| 639 | def _validate_greaterthan_minushalf(s): |
searching dependent graphs…