diff --git a/packages/python/plotly/codegen/datatypes.py b/packages/python/plotly/codegen/datatypes.py index 64828bc428..6355faacfd 100644 --- a/packages/python/plotly/codegen/datatypes.py +++ b/packages/python/plotly/codegen/datatypes.py @@ -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+)$') """ ) diff --git a/packages/python/plotly/plotly/basedatatypes.py b/packages/python/plotly/plotly/basedatatypes.py index 6a36f9bdae..f91e4a96ae 100644 --- a/packages/python/plotly/plotly/basedatatypes.py +++ b/packages/python/plotly/plotly/basedatatypes.py @@ -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", diff --git a/packages/python/plotly/plotly/graph_objs/_layout.py b/packages/python/plotly/plotly/graph_objs/_layout.py index f09c606b88..f54e9892e6 100644 --- a/packages/python/plotly/plotly/graph_objs/_layout.py +++ b/packages/python/plotly/plotly/graph_objs/_layout.py @@ -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):