Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct some regular expression syntax. #2577

Merged
merged 8 commits into from
Jun 24, 2020
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