Skip to content

Commit 1ca3e71

Browse files
Merge pull request #3244 from plotly/pattern
allow / pattern in bars
2 parents 535b739 + dcc1072 commit 1ca3e71

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/python/plotly/_plotly_utils/basevalidators.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,13 @@ def __init__(
458458
# ----------------------------
459459
# Look for regular expressions
460460
for v in self.values:
461-
if v and isinstance(v, string_types) and v[0] == "/" and v[-1] == "/":
461+
if (
462+
v
463+
and isinstance(v, string_types)
464+
and v[0] == "/"
465+
and v[-1] == "/"
466+
and len(v) > 1
467+
):
462468
# String is a regex with leading and trailing '/' character
463469
regex_str = v[1:-1]
464470
self.val_regexs.append(re.compile(regex_str))

0 commit comments

Comments
 (0)