We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 535b739 + dcc1072 commit 1ca3e71Copy full SHA for 1ca3e71
packages/python/plotly/_plotly_utils/basevalidators.py
@@ -458,7 +458,13 @@ def __init__(
458
# ----------------------------
459
# Look for regular expressions
460
for v in self.values:
461
- if v and isinstance(v, string_types) and v[0] == "/" and v[-1] == "/":
+ if (
462
+ v
463
+ and isinstance(v, string_types)
464
+ and v[0] == "/"
465
+ and v[-1] == "/"
466
+ and len(v) > 1
467
+ ):
468
# String is a regex with leading and trailing '/' character
469
regex_str = v[1:-1]
470
self.val_regexs.append(re.compile(regex_str))
0 commit comments