From 9b28162f1f18d8f01bfecfb04d77a48ef6547037 Mon Sep 17 00:00:00 2001 From: georgevdd Date: Thu, 18 Jun 2020 18:52:09 +0100 Subject: [PATCH 1/3] Correct some badly-formed regular expressions. To test: python3 -W once -c 'from plotly.graph_objs import _layout' python3 -W once -c 'from plotly import basedatatypes' --- packages/python/plotly/plotly/basedatatypes.py | 2 +- packages/python/plotly/plotly/graph_objs/_layout.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/python/plotly/plotly/basedatatypes.py b/packages/python/plotly/plotly/basedatatypes.py index f520a1669a5..5d9218250ac 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 f09c606b889..f54e9892e65 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): From f291e5eaf8430a7bad69ef9a0ff2f5a3708e066a Mon Sep 17 00:00:00 2001 From: georgevdd Date: Thu, 18 Jun 2020 18:52:09 +0100 Subject: [PATCH 2/3] Correct some badly-formed regular expressions. To test: python3 -W once -c 'from plotly.graph_objs import _layout' python3 -W once -c 'from plotly import basedatatypes' --- packages/python/plotly/plotly/basedatatypes.py | 2 +- packages/python/plotly/plotly/graph_objs/_layout.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/python/plotly/plotly/basedatatypes.py b/packages/python/plotly/plotly/basedatatypes.py index f520a1669a5..5d9218250ac 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 f09c606b889..f54e9892e65 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): From eb12ec7d3866c1a3c02e06d4534d96cb80f93da9 Mon Sep 17 00:00:00 2001 From: georgevdd Date: Fri, 19 Jun 2020 01:00:02 +0100 Subject: [PATCH 3/3] Correct some badly string syntax in regular expressions. --- packages/python/plotly/plotly/basedatatypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/plotly/plotly/basedatatypes.py b/packages/python/plotly/plotly/basedatatypes.py index 5d9218250ac..b035e49cab4 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(r"^(.*)[(\d+)]$") + _bracket_re = re.compile(r"^(.*)\[(\d+)\]$") _valid_underscore_properties = { "error_x": "error-x",