From 091f4c1c10a7dfac29598bf06036a09bdc35f76c Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Wed, 29 Aug 2018 17:55:22 -0400 Subject: [PATCH] Fix deprecation warning for go.Annotations. (#1138) There is no go.layout.Annotations (it should not have been plural) --- codegen/compatibility.py | 2 +- plotly/graph_objs/_deprecations.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/codegen/compatibility.py b/codegen/compatibility.py index 7dcbe9e80e..09f60900bc 100644 --- a/codegen/compatibility.py +++ b/codegen/compatibility.py @@ -11,7 +11,7 @@ 'new': ['Scatter', 'Bar', 'Area', 'Histogram', 'etc.']}, 'Annotations': {'base_type': list, - 'new': ['layout', 'layout.scene']}, + 'new': ['layout.Annotation', 'layout.scene.Annotation']}, 'Frames': {'base_type': list, 'new': ['Frame']}, diff --git a/plotly/graph_objs/_deprecations.py b/plotly/graph_objs/_deprecations.py index f6ea86d66c..0cbfe3cf6f 100644 --- a/plotly/graph_objs/_deprecations.py +++ b/plotly/graph_objs/_deprecations.py @@ -45,8 +45,8 @@ class Annotations(list): """ plotly.graph_objs.Annotations is deprecated. Please replace it with a list or tuple of instances of the following types - - plotly.graph_objs.layout.Annotations - - plotly.graph_objs.layout.scene.Annotations + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation """ @@ -54,15 +54,15 @@ def __init__(self, *args, **kwargs): """ plotly.graph_objs.Annotations is deprecated. Please replace it with a list or tuple of instances of the following types - - plotly.graph_objs.layout.Annotations - - plotly.graph_objs.layout.scene.Annotations + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation """ warnings.warn( """plotly.graph_objs.Annotations is deprecated. Please replace it with a list or tuple of instances of the following types - - plotly.graph_objs.layout.Annotations - - plotly.graph_objs.layout.scene.Annotations + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation """, DeprecationWarning ) super(Annotations, self).__init__(*args, **kwargs)