Skip to content

Commit

Permalink
Correct some regular expression syntax. (#2577)
Browse files Browse the repository at this point in the history
* Correct some badly-formed regular expressions.
  • Loading branch information
georgevdd authored Jun 24, 2020
1 parent 467ba95 commit e281bc9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/python/plotly/codegen/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class {datatype_class}(_{node.name_base_datatype}):\n"""
import re
_subplotid_prop_re = re.compile(
'^(' + '|'.join(_subplotid_prop_names) + ')(\d+)$')
'^(' + '|'.join(_subplotid_prop_names) + r')(\d+)$')
"""
)

Expand Down
2 changes: 1 addition & 1 deletion packages/python/plotly/plotly/basedatatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BaseFigure(object):
Base class for all figure types (both widget and non-widget)
"""

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

_valid_underscore_properties = {
"error_x": "error-x",
Expand Down
2 changes: 1 addition & 1 deletion packages/python/plotly/plotly/graph_objs/_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Layout(_BaseLayoutType):

import re

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

@property
def _subplotid_validators(self):
Expand Down

0 comments on commit e281bc9

Please sign in to comment.