Skip to content

Commit e281bc9

Browse files
authored
Correct some regular expression syntax. (#2577)
* Correct some badly-formed regular expressions.
1 parent 467ba95 commit e281bc9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: packages/python/plotly/codegen/datatypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class {datatype_class}(_{node.name_base_datatype}):\n"""
117117
118118
import re
119119
_subplotid_prop_re = re.compile(
120-
'^(' + '|'.join(_subplotid_prop_names) + ')(\d+)$')
120+
'^(' + '|'.join(_subplotid_prop_names) + r')(\d+)$')
121121
"""
122122
)
123123

Diff for: packages/python/plotly/plotly/basedatatypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BaseFigure(object):
2323
Base class for all figure types (both widget and non-widget)
2424
"""
2525

26-
_bracket_re = re.compile("^(.*)\[(\d+)\]$")
26+
_bracket_re = re.compile(r"^(.*)\[(\d+)\]$")
2727

2828
_valid_underscore_properties = {
2929
"error_x": "error-x",

Diff for: packages/python/plotly/plotly/graph_objs/_layout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Layout(_BaseLayoutType):
1717

1818
import re
1919

20-
_subplotid_prop_re = re.compile("^(" + "|".join(_subplotid_prop_names) + ")(\d+)$")
20+
_subplotid_prop_re = re.compile("^(" + "|".join(_subplotid_prop_names) + r")(\d+)$")
2121

2222
@property
2323
def _subplotid_validators(self):

0 commit comments

Comments
 (0)