From 3ce4b8a26c69098545a379c39f0f31bee9ddd0f4 Mon Sep 17 00:00:00 2001 From: Erik Paskalev Date: Fri, 27 Jun 2025 03:56:42 +0300 Subject: [PATCH 1/4] fix: add_hline not working with make_subplots if not populated --- plotly/basedatatypes.py | 2 + .../test_add_hline_empty_subplots.py | 29 ++++++++++++ .../test_hline_subplots_bug.py | 46 +++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 tests/test_core/test_shapes/test_add_hline_empty_subplots.py create mode 100644 tests/test_regression/test_hline_subplots_bug.py diff --git a/plotly/basedatatypes.py b/plotly/basedatatypes.py index 72f4cd25ca..e3545914b3 100644 --- a/plotly/basedatatypes.py +++ b/plotly/basedatatypes.py @@ -4093,6 +4093,8 @@ def _process_multiple_axis_spanning_shapes( augmented_annotation = shapeannotation.axis_spanning_shape_annotation( annotation, shape_type, shape_args, annotation_kwargs ) + if exclude_empty_subplots and len(self.data) == 0: + exclude_empty_subplots = False self.add_shape( row=row, col=col, diff --git a/tests/test_core/test_shapes/test_add_hline_empty_subplots.py b/tests/test_core/test_shapes/test_add_hline_empty_subplots.py new file mode 100644 index 0000000000..6da853120e --- /dev/null +++ b/tests/test_core/test_shapes/test_add_hline_empty_subplots.py @@ -0,0 +1,29 @@ +import pytest +import plotly.graph_objects as go +from plotly.subplots import make_subplots + +def test_add_hline_on_empty_subplots_creates_shape_default(): + fig = make_subplots(rows=1, cols=1) + fig.add_hline(y=0.25) + shapes = fig.layout.shapes + assert len(shapes) == 1, "Expected one shape for the horizontal line" + shape = shapes[0] + assert shape.type == 'line' + assert shape.y0 == 0.25 and shape.y1 == 0.25 + # xref and yref should be set + assert getattr(shape, 'xref', None) is not None + assert getattr(shape, 'yref', None) is not None + +@pytest.mark.parametrize("row, col", [(None, None), (1, 1)]) +def test_add_hline_with_explicit_row_col_on_empty_subplots(row, col): + fig = make_subplots(rows=1, cols=1) + # explicit row/col + fig.add_hline(y=0.5, row=row, col=col) + shapes = fig.layout.shapes + assert len(shapes) == 1, f"Expected one shape when row={row}, col={col}" + shape = shapes[0] + assert shape.y0 == 0.5 and shape.y1 == 0.5 + assert shape.type == 'line' + # ensure references default + assert shape.xref is not None + assert shape.yref is not None \ No newline at end of file diff --git a/tests/test_regression/test_hline_subplots_bug.py b/tests/test_regression/test_hline_subplots_bug.py new file mode 100644 index 0000000000..2a853f9bac --- /dev/null +++ b/tests/test_regression/test_hline_subplots_bug.py @@ -0,0 +1,46 @@ +import pytest +import plotly.graph_objects as go +from plotly.subplots import make_subplots + + +def _apply_line(fig, orientation): + if orientation == "h": + fig.add_hline(y=0.5) + elif orientation == "v": + fig.add_vline(x=0.3) + else: + raise ValueError("orientation must be 'h' or 'v'") + + +@pytest.mark.parametrize("orientation,kwargs", [ + ("h", dict(line_coord_key="y0", coord=0.5, span_keys=("x0", "x1"), span_vals=(0, 1))), + ("v", dict(line_coord_key="x0", coord=0.3, span_keys=("y0", "y1"), span_vals=(0, 1))), +]) +@pytest.mark.parametrize("constructor", [ + pytest.param(lambda: go.Figure(), id="plain-figure"), + pytest.param(lambda: make_subplots(rows=1, cols=1), id="make_subplots"), +]) + +def test_add_line_presence(orientation, kwargs, constructor): + """Both add_hline and add_vline must create a shape, even on empty subplots.""" + fig = constructor() + + assert len(fig.data) == 0 + assert len(fig.layout.shapes) == 0 + + _apply_line(fig, orientation) + + # exactly one shape expected regardless of constructor and orientation + assert len(fig.layout.shapes) == 1, ( + f"add_{orientation}line must create a shape on an empty figure; " + "currently fails for make_subplots." + ) + + shape = fig.layout.shapes[0] + # validate coordinate of line + assert pytest.approx(shape[kwargs["line_coord_key"]]) == kwargs["coord"] + # validate full-span of the other axis + span_key0, span_key1 = kwargs["span_keys"] + expected0, expected1 = kwargs["span_vals"] + assert shape[span_key0] == expected0 + assert shape[span_key1] == expected1 \ No newline at end of file From b92a744e3dd48c19aaf322366097908d351bdb1b Mon Sep 17 00:00:00 2001 From: Erik Paskalev Date: Fri, 27 Jun 2025 13:52:16 +0300 Subject: [PATCH 2/4] Format: Update formatting to adhere to check --- plotly/graph_objs/layout/template/_layout.py | 1 - plotly/graph_objs/layout/template/data/_bar.py | 1 - plotly/graph_objs/layout/template/data/_barpolar.py | 1 - plotly/graph_objs/layout/template/data/_box.py | 1 - plotly/graph_objs/layout/template/data/_candlestick.py | 1 - plotly/graph_objs/layout/template/data/_carpet.py | 1 - plotly/graph_objs/layout/template/data/_choropleth.py | 1 - plotly/graph_objs/layout/template/data/_choroplethmap.py | 1 - plotly/graph_objs/layout/template/data/_choroplethmapbox.py | 1 - plotly/graph_objs/layout/template/data/_cone.py | 1 - plotly/graph_objs/layout/template/data/_contour.py | 1 - plotly/graph_objs/layout/template/data/_contourcarpet.py | 1 - plotly/graph_objs/layout/template/data/_densitymap.py | 1 - plotly/graph_objs/layout/template/data/_densitymapbox.py | 1 - plotly/graph_objs/layout/template/data/_funnel.py | 1 - plotly/graph_objs/layout/template/data/_funnelarea.py | 1 - plotly/graph_objs/layout/template/data/_heatmap.py | 1 - plotly/graph_objs/layout/template/data/_histogram.py | 1 - plotly/graph_objs/layout/template/data/_histogram2d.py | 1 - plotly/graph_objs/layout/template/data/_histogram2dcontour.py | 1 - plotly/graph_objs/layout/template/data/_icicle.py | 1 - plotly/graph_objs/layout/template/data/_image.py | 1 - plotly/graph_objs/layout/template/data/_indicator.py | 1 - plotly/graph_objs/layout/template/data/_isosurface.py | 1 - plotly/graph_objs/layout/template/data/_mesh3d.py | 1 - plotly/graph_objs/layout/template/data/_ohlc.py | 1 - plotly/graph_objs/layout/template/data/_parcats.py | 1 - plotly/graph_objs/layout/template/data/_parcoords.py | 1 - plotly/graph_objs/layout/template/data/_pie.py | 1 - plotly/graph_objs/layout/template/data/_sankey.py | 1 - plotly/graph_objs/layout/template/data/_scatter.py | 1 - plotly/graph_objs/layout/template/data/_scatter3d.py | 1 - plotly/graph_objs/layout/template/data/_scattercarpet.py | 1 - plotly/graph_objs/layout/template/data/_scattergeo.py | 1 - plotly/graph_objs/layout/template/data/_scattergl.py | 1 - plotly/graph_objs/layout/template/data/_scattermap.py | 1 - plotly/graph_objs/layout/template/data/_scattermapbox.py | 1 - plotly/graph_objs/layout/template/data/_scatterpolar.py | 1 - plotly/graph_objs/layout/template/data/_scatterpolargl.py | 1 - plotly/graph_objs/layout/template/data/_scattersmith.py | 1 - plotly/graph_objs/layout/template/data/_scatterternary.py | 1 - plotly/graph_objs/layout/template/data/_splom.py | 1 - plotly/graph_objs/layout/template/data/_streamtube.py | 1 - plotly/graph_objs/layout/template/data/_sunburst.py | 1 - plotly/graph_objs/layout/template/data/_surface.py | 1 - plotly/graph_objs/layout/template/data/_table.py | 1 - plotly/graph_objs/layout/template/data/_treemap.py | 1 - plotly/graph_objs/layout/template/data/_violin.py | 1 - plotly/graph_objs/layout/template/data/_volume.py | 1 - plotly/graph_objs/layout/template/data/_waterfall.py | 1 - tests/test_core/test_shapes/test_add_hline_empty_subplots.py | 1 - 51 files changed, 51 deletions(-) diff --git a/plotly/graph_objs/layout/template/_layout.py b/plotly/graph_objs/layout/template/_layout.py index 058b60b807..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/_layout.py +++ b/plotly/graph_objs/layout/template/_layout.py @@ -1 +0,0 @@ -from plotly.graph_objs import Layout diff --git a/plotly/graph_objs/layout/template/data/_bar.py b/plotly/graph_objs/layout/template/data/_bar.py index 5a800e6408..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_bar.py +++ b/plotly/graph_objs/layout/template/data/_bar.py @@ -1 +0,0 @@ -from plotly.graph_objs import Bar diff --git a/plotly/graph_objs/layout/template/data/_barpolar.py b/plotly/graph_objs/layout/template/data/_barpolar.py index 18abed8bbb..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_barpolar.py +++ b/plotly/graph_objs/layout/template/data/_barpolar.py @@ -1 +0,0 @@ -from plotly.graph_objs import Barpolar diff --git a/plotly/graph_objs/layout/template/data/_box.py b/plotly/graph_objs/layout/template/data/_box.py index ffdd1d9213..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_box.py +++ b/plotly/graph_objs/layout/template/data/_box.py @@ -1 +0,0 @@ -from plotly.graph_objs import Box diff --git a/plotly/graph_objs/layout/template/data/_candlestick.py b/plotly/graph_objs/layout/template/data/_candlestick.py index 5d11b44859..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_candlestick.py +++ b/plotly/graph_objs/layout/template/data/_candlestick.py @@ -1 +0,0 @@ -from plotly.graph_objs import Candlestick diff --git a/plotly/graph_objs/layout/template/data/_carpet.py b/plotly/graph_objs/layout/template/data/_carpet.py index b923d73904..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_carpet.py +++ b/plotly/graph_objs/layout/template/data/_carpet.py @@ -1 +0,0 @@ -from plotly.graph_objs import Carpet diff --git a/plotly/graph_objs/layout/template/data/_choropleth.py b/plotly/graph_objs/layout/template/data/_choropleth.py index 733e12709c..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_choropleth.py +++ b/plotly/graph_objs/layout/template/data/_choropleth.py @@ -1 +0,0 @@ -from plotly.graph_objs import Choropleth diff --git a/plotly/graph_objs/layout/template/data/_choroplethmap.py b/plotly/graph_objs/layout/template/data/_choroplethmap.py index 855102a43f..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_choroplethmap.py +++ b/plotly/graph_objs/layout/template/data/_choroplethmap.py @@ -1 +0,0 @@ -from plotly.graph_objs import Choroplethmap diff --git a/plotly/graph_objs/layout/template/data/_choroplethmapbox.py b/plotly/graph_objs/layout/template/data/_choroplethmapbox.py index 220b93564e..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_choroplethmapbox.py +++ b/plotly/graph_objs/layout/template/data/_choroplethmapbox.py @@ -1 +0,0 @@ -from plotly.graph_objs import Choroplethmapbox diff --git a/plotly/graph_objs/layout/template/data/_cone.py b/plotly/graph_objs/layout/template/data/_cone.py index 7a284527a8..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_cone.py +++ b/plotly/graph_objs/layout/template/data/_cone.py @@ -1 +0,0 @@ -from plotly.graph_objs import Cone diff --git a/plotly/graph_objs/layout/template/data/_contour.py b/plotly/graph_objs/layout/template/data/_contour.py index e474909a4d..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_contour.py +++ b/plotly/graph_objs/layout/template/data/_contour.py @@ -1 +0,0 @@ -from plotly.graph_objs import Contour diff --git a/plotly/graph_objs/layout/template/data/_contourcarpet.py b/plotly/graph_objs/layout/template/data/_contourcarpet.py index 6240faf510..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_contourcarpet.py +++ b/plotly/graph_objs/layout/template/data/_contourcarpet.py @@ -1 +0,0 @@ -from plotly.graph_objs import Contourcarpet diff --git a/plotly/graph_objs/layout/template/data/_densitymap.py b/plotly/graph_objs/layout/template/data/_densitymap.py index c73e108c7c..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_densitymap.py +++ b/plotly/graph_objs/layout/template/data/_densitymap.py @@ -1 +0,0 @@ -from plotly.graph_objs import Densitymap diff --git a/plotly/graph_objs/layout/template/data/_densitymapbox.py b/plotly/graph_objs/layout/template/data/_densitymapbox.py index d655b21ab3..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_densitymapbox.py +++ b/plotly/graph_objs/layout/template/data/_densitymapbox.py @@ -1 +0,0 @@ -from plotly.graph_objs import Densitymapbox diff --git a/plotly/graph_objs/layout/template/data/_funnel.py b/plotly/graph_objs/layout/template/data/_funnel.py index 70e2ba74d4..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_funnel.py +++ b/plotly/graph_objs/layout/template/data/_funnel.py @@ -1 +0,0 @@ -from plotly.graph_objs import Funnel diff --git a/plotly/graph_objs/layout/template/data/_funnelarea.py b/plotly/graph_objs/layout/template/data/_funnelarea.py index 242d0fcc96..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_funnelarea.py +++ b/plotly/graph_objs/layout/template/data/_funnelarea.py @@ -1 +0,0 @@ -from plotly.graph_objs import Funnelarea diff --git a/plotly/graph_objs/layout/template/data/_heatmap.py b/plotly/graph_objs/layout/template/data/_heatmap.py index 6098ee83e7..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_heatmap.py +++ b/plotly/graph_objs/layout/template/data/_heatmap.py @@ -1 +0,0 @@ -from plotly.graph_objs import Heatmap diff --git a/plotly/graph_objs/layout/template/data/_histogram.py b/plotly/graph_objs/layout/template/data/_histogram.py index 7ba4c6df2f..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_histogram.py +++ b/plotly/graph_objs/layout/template/data/_histogram.py @@ -1 +0,0 @@ -from plotly.graph_objs import Histogram diff --git a/plotly/graph_objs/layout/template/data/_histogram2d.py b/plotly/graph_objs/layout/template/data/_histogram2d.py index 710f7f9929..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_histogram2d.py +++ b/plotly/graph_objs/layout/template/data/_histogram2d.py @@ -1 +0,0 @@ -from plotly.graph_objs import Histogram2d diff --git a/plotly/graph_objs/layout/template/data/_histogram2dcontour.py b/plotly/graph_objs/layout/template/data/_histogram2dcontour.py index 94af41aa92..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_histogram2dcontour.py +++ b/plotly/graph_objs/layout/template/data/_histogram2dcontour.py @@ -1 +0,0 @@ -from plotly.graph_objs import Histogram2dContour diff --git a/plotly/graph_objs/layout/template/data/_icicle.py b/plotly/graph_objs/layout/template/data/_icicle.py index 6749cbe60a..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_icicle.py +++ b/plotly/graph_objs/layout/template/data/_icicle.py @@ -1 +0,0 @@ -from plotly.graph_objs import Icicle diff --git a/plotly/graph_objs/layout/template/data/_image.py b/plotly/graph_objs/layout/template/data/_image.py index 828920ac69..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_image.py +++ b/plotly/graph_objs/layout/template/data/_image.py @@ -1 +0,0 @@ -from plotly.graph_objs import Image diff --git a/plotly/graph_objs/layout/template/data/_indicator.py b/plotly/graph_objs/layout/template/data/_indicator.py index a5a488f8bb..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_indicator.py +++ b/plotly/graph_objs/layout/template/data/_indicator.py @@ -1 +0,0 @@ -from plotly.graph_objs import Indicator diff --git a/plotly/graph_objs/layout/template/data/_isosurface.py b/plotly/graph_objs/layout/template/data/_isosurface.py index 5a7885ab64..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_isosurface.py +++ b/plotly/graph_objs/layout/template/data/_isosurface.py @@ -1 +0,0 @@ -from plotly.graph_objs import Isosurface diff --git a/plotly/graph_objs/layout/template/data/_mesh3d.py b/plotly/graph_objs/layout/template/data/_mesh3d.py index 2172a23bd4..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_mesh3d.py +++ b/plotly/graph_objs/layout/template/data/_mesh3d.py @@ -1 +0,0 @@ -from plotly.graph_objs import Mesh3d diff --git a/plotly/graph_objs/layout/template/data/_ohlc.py b/plotly/graph_objs/layout/template/data/_ohlc.py index d3f857428c..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_ohlc.py +++ b/plotly/graph_objs/layout/template/data/_ohlc.py @@ -1 +0,0 @@ -from plotly.graph_objs import Ohlc diff --git a/plotly/graph_objs/layout/template/data/_parcats.py b/plotly/graph_objs/layout/template/data/_parcats.py index 9b0290bcce..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_parcats.py +++ b/plotly/graph_objs/layout/template/data/_parcats.py @@ -1 +0,0 @@ -from plotly.graph_objs import Parcats diff --git a/plotly/graph_objs/layout/template/data/_parcoords.py b/plotly/graph_objs/layout/template/data/_parcoords.py index ccf5629c54..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_parcoords.py +++ b/plotly/graph_objs/layout/template/data/_parcoords.py @@ -1 +0,0 @@ -from plotly.graph_objs import Parcoords diff --git a/plotly/graph_objs/layout/template/data/_pie.py b/plotly/graph_objs/layout/template/data/_pie.py index 0625fd2888..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_pie.py +++ b/plotly/graph_objs/layout/template/data/_pie.py @@ -1 +0,0 @@ -from plotly.graph_objs import Pie diff --git a/plotly/graph_objs/layout/template/data/_sankey.py b/plotly/graph_objs/layout/template/data/_sankey.py index b572f657ce..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_sankey.py +++ b/plotly/graph_objs/layout/template/data/_sankey.py @@ -1 +0,0 @@ -from plotly.graph_objs import Sankey diff --git a/plotly/graph_objs/layout/template/data/_scatter.py b/plotly/graph_objs/layout/template/data/_scatter.py index afcfab30af..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scatter.py +++ b/plotly/graph_objs/layout/template/data/_scatter.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scatter diff --git a/plotly/graph_objs/layout/template/data/_scatter3d.py b/plotly/graph_objs/layout/template/data/_scatter3d.py index 93146220e3..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scatter3d.py +++ b/plotly/graph_objs/layout/template/data/_scatter3d.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scatter3d diff --git a/plotly/graph_objs/layout/template/data/_scattercarpet.py b/plotly/graph_objs/layout/template/data/_scattercarpet.py index 26d87ca7c1..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scattercarpet.py +++ b/plotly/graph_objs/layout/template/data/_scattercarpet.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scattercarpet diff --git a/plotly/graph_objs/layout/template/data/_scattergeo.py b/plotly/graph_objs/layout/template/data/_scattergeo.py index 34308e1a08..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scattergeo.py +++ b/plotly/graph_objs/layout/template/data/_scattergeo.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scattergeo diff --git a/plotly/graph_objs/layout/template/data/_scattergl.py b/plotly/graph_objs/layout/template/data/_scattergl.py index 30bd3712b8..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scattergl.py +++ b/plotly/graph_objs/layout/template/data/_scattergl.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scattergl diff --git a/plotly/graph_objs/layout/template/data/_scattermap.py b/plotly/graph_objs/layout/template/data/_scattermap.py index 5a494e2320..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scattermap.py +++ b/plotly/graph_objs/layout/template/data/_scattermap.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scattermap diff --git a/plotly/graph_objs/layout/template/data/_scattermapbox.py b/plotly/graph_objs/layout/template/data/_scattermapbox.py index 6c3333aa94..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scattermapbox.py +++ b/plotly/graph_objs/layout/template/data/_scattermapbox.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scattermapbox diff --git a/plotly/graph_objs/layout/template/data/_scatterpolar.py b/plotly/graph_objs/layout/template/data/_scatterpolar.py index e1417b2381..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scatterpolar.py +++ b/plotly/graph_objs/layout/template/data/_scatterpolar.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scatterpolar diff --git a/plotly/graph_objs/layout/template/data/_scatterpolargl.py b/plotly/graph_objs/layout/template/data/_scatterpolargl.py index 60b023a581..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scatterpolargl.py +++ b/plotly/graph_objs/layout/template/data/_scatterpolargl.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scatterpolargl diff --git a/plotly/graph_objs/layout/template/data/_scattersmith.py b/plotly/graph_objs/layout/template/data/_scattersmith.py index e2dcf41bd0..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scattersmith.py +++ b/plotly/graph_objs/layout/template/data/_scattersmith.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scattersmith diff --git a/plotly/graph_objs/layout/template/data/_scatterternary.py b/plotly/graph_objs/layout/template/data/_scatterternary.py index 2221eadd54..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_scatterternary.py +++ b/plotly/graph_objs/layout/template/data/_scatterternary.py @@ -1 +0,0 @@ -from plotly.graph_objs import Scatterternary diff --git a/plotly/graph_objs/layout/template/data/_splom.py b/plotly/graph_objs/layout/template/data/_splom.py index 0909cdfd9d..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_splom.py +++ b/plotly/graph_objs/layout/template/data/_splom.py @@ -1 +0,0 @@ -from plotly.graph_objs import Splom diff --git a/plotly/graph_objs/layout/template/data/_streamtube.py b/plotly/graph_objs/layout/template/data/_streamtube.py index 8b23c3161c..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_streamtube.py +++ b/plotly/graph_objs/layout/template/data/_streamtube.py @@ -1 +0,0 @@ -from plotly.graph_objs import Streamtube diff --git a/plotly/graph_objs/layout/template/data/_sunburst.py b/plotly/graph_objs/layout/template/data/_sunburst.py index 1b9511c7d5..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_sunburst.py +++ b/plotly/graph_objs/layout/template/data/_sunburst.py @@ -1 +0,0 @@ -from plotly.graph_objs import Sunburst diff --git a/plotly/graph_objs/layout/template/data/_surface.py b/plotly/graph_objs/layout/template/data/_surface.py index cfaa55d738..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_surface.py +++ b/plotly/graph_objs/layout/template/data/_surface.py @@ -1 +0,0 @@ -from plotly.graph_objs import Surface diff --git a/plotly/graph_objs/layout/template/data/_table.py b/plotly/graph_objs/layout/template/data/_table.py index 2b6d4ad1e5..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_table.py +++ b/plotly/graph_objs/layout/template/data/_table.py @@ -1 +0,0 @@ -from plotly.graph_objs import Table diff --git a/plotly/graph_objs/layout/template/data/_treemap.py b/plotly/graph_objs/layout/template/data/_treemap.py index 5c648e7108..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_treemap.py +++ b/plotly/graph_objs/layout/template/data/_treemap.py @@ -1 +0,0 @@ -from plotly.graph_objs import Treemap diff --git a/plotly/graph_objs/layout/template/data/_violin.py b/plotly/graph_objs/layout/template/data/_violin.py index 23221b6677..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_violin.py +++ b/plotly/graph_objs/layout/template/data/_violin.py @@ -1 +0,0 @@ -from plotly.graph_objs import Violin diff --git a/plotly/graph_objs/layout/template/data/_volume.py b/plotly/graph_objs/layout/template/data/_volume.py index 1128580ca0..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_volume.py +++ b/plotly/graph_objs/layout/template/data/_volume.py @@ -1 +0,0 @@ -from plotly.graph_objs import Volume diff --git a/plotly/graph_objs/layout/template/data/_waterfall.py b/plotly/graph_objs/layout/template/data/_waterfall.py index c45e7852a2..e69de29bb2 100644 --- a/plotly/graph_objs/layout/template/data/_waterfall.py +++ b/plotly/graph_objs/layout/template/data/_waterfall.py @@ -1 +0,0 @@ -from plotly.graph_objs import Waterfall diff --git a/tests/test_core/test_shapes/test_add_hline_empty_subplots.py b/tests/test_core/test_shapes/test_add_hline_empty_subplots.py index 6da853120e..ca8f232c64 100644 --- a/tests/test_core/test_shapes/test_add_hline_empty_subplots.py +++ b/tests/test_core/test_shapes/test_add_hline_empty_subplots.py @@ -1,5 +1,4 @@ import pytest -import plotly.graph_objects as go from plotly.subplots import make_subplots def test_add_hline_on_empty_subplots_creates_shape_default(): From f8432ee9ec4d9c9175d2ef5de30c018840ad81cd Mon Sep 17 00:00:00 2001 From: Erik Paskalev Date: Fri, 27 Jun 2025 14:18:36 +0300 Subject: [PATCH 3/4] Format: reformat the a new unit tests --- .../test_add_hline_empty_subplots.py | 12 ++++--- .../test_hline_subplots_bug.py | 35 +++++++++++++------ 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/tests/test_core/test_shapes/test_add_hline_empty_subplots.py b/tests/test_core/test_shapes/test_add_hline_empty_subplots.py index ca8f232c64..60396de3d9 100644 --- a/tests/test_core/test_shapes/test_add_hline_empty_subplots.py +++ b/tests/test_core/test_shapes/test_add_hline_empty_subplots.py @@ -1,17 +1,19 @@ import pytest from plotly.subplots import make_subplots + def test_add_hline_on_empty_subplots_creates_shape_default(): fig = make_subplots(rows=1, cols=1) fig.add_hline(y=0.25) shapes = fig.layout.shapes assert len(shapes) == 1, "Expected one shape for the horizontal line" shape = shapes[0] - assert shape.type == 'line' + assert shape.type == "line" assert shape.y0 == 0.25 and shape.y1 == 0.25 # xref and yref should be set - assert getattr(shape, 'xref', None) is not None - assert getattr(shape, 'yref', None) is not None + assert getattr(shape, "xref", None) is not None + assert getattr(shape, "yref", None) is not None + @pytest.mark.parametrize("row, col", [(None, None), (1, 1)]) def test_add_hline_with_explicit_row_col_on_empty_subplots(row, col): @@ -22,7 +24,7 @@ def test_add_hline_with_explicit_row_col_on_empty_subplots(row, col): assert len(shapes) == 1, f"Expected one shape when row={row}, col={col}" shape = shapes[0] assert shape.y0 == 0.5 and shape.y1 == 0.5 - assert shape.type == 'line' + assert shape.type == "line" # ensure references default assert shape.xref is not None - assert shape.yref is not None \ No newline at end of file + assert shape.yref is not None diff --git a/tests/test_regression/test_hline_subplots_bug.py b/tests/test_regression/test_hline_subplots_bug.py index 2a853f9bac..8d00b2cd15 100644 --- a/tests/test_regression/test_hline_subplots_bug.py +++ b/tests/test_regression/test_hline_subplots_bug.py @@ -12,15 +12,30 @@ def _apply_line(fig, orientation): raise ValueError("orientation must be 'h' or 'v'") -@pytest.mark.parametrize("orientation,kwargs", [ - ("h", dict(line_coord_key="y0", coord=0.5, span_keys=("x0", "x1"), span_vals=(0, 1))), - ("v", dict(line_coord_key="x0", coord=0.3, span_keys=("y0", "y1"), span_vals=(0, 1))), -]) -@pytest.mark.parametrize("constructor", [ - pytest.param(lambda: go.Figure(), id="plain-figure"), - pytest.param(lambda: make_subplots(rows=1, cols=1), id="make_subplots"), -]) - +@pytest.mark.parametrize( + "orientation,kwargs", + [ + ( + "h", + dict( + line_coord_key="y0", coord=0.5, span_keys=("x0", "x1"), span_vals=(0, 1) + ), + ), + ( + "v", + dict( + line_coord_key="x0", coord=0.3, span_keys=("y0", "y1"), span_vals=(0, 1) + ), + ), + ], +) +@pytest.mark.parametrize( + "constructor", + [ + pytest.param(lambda: go.Figure(), id="plain-figure"), + pytest.param(lambda: make_subplots(rows=1, cols=1), id="make_subplots"), + ], +) def test_add_line_presence(orientation, kwargs, constructor): """Both add_hline and add_vline must create a shape, even on empty subplots.""" fig = constructor() @@ -43,4 +58,4 @@ def test_add_line_presence(orientation, kwargs, constructor): span_key0, span_key1 = kwargs["span_keys"] expected0, expected1 = kwargs["span_vals"] assert shape[span_key0] == expected0 - assert shape[span_key1] == expected1 \ No newline at end of file + assert shape[span_key1] == expected1 From 35b344b26da7713d42de7e7192685f903eb73192 Mon Sep 17 00:00:00 2001 From: Erik Paskalev Date: Fri, 27 Jun 2025 14:42:57 +0300 Subject: [PATCH 4/4] Revert "Format: Update formatting to adhere to check" to fix build errors This reverts commit b92a744e3dd48c19aaf322366097908d351bdb1b. --- plotly/graph_objs/layout/template/_layout.py | 1 + plotly/graph_objs/layout/template/data/_bar.py | 1 + plotly/graph_objs/layout/template/data/_barpolar.py | 1 + plotly/graph_objs/layout/template/data/_box.py | 1 + plotly/graph_objs/layout/template/data/_candlestick.py | 1 + plotly/graph_objs/layout/template/data/_carpet.py | 1 + plotly/graph_objs/layout/template/data/_choropleth.py | 1 + plotly/graph_objs/layout/template/data/_choroplethmap.py | 1 + plotly/graph_objs/layout/template/data/_choroplethmapbox.py | 1 + plotly/graph_objs/layout/template/data/_cone.py | 1 + plotly/graph_objs/layout/template/data/_contour.py | 1 + plotly/graph_objs/layout/template/data/_contourcarpet.py | 1 + plotly/graph_objs/layout/template/data/_densitymap.py | 1 + plotly/graph_objs/layout/template/data/_densitymapbox.py | 1 + plotly/graph_objs/layout/template/data/_funnel.py | 1 + plotly/graph_objs/layout/template/data/_funnelarea.py | 1 + plotly/graph_objs/layout/template/data/_heatmap.py | 1 + plotly/graph_objs/layout/template/data/_histogram.py | 1 + plotly/graph_objs/layout/template/data/_histogram2d.py | 1 + plotly/graph_objs/layout/template/data/_histogram2dcontour.py | 1 + plotly/graph_objs/layout/template/data/_icicle.py | 1 + plotly/graph_objs/layout/template/data/_image.py | 1 + plotly/graph_objs/layout/template/data/_indicator.py | 1 + plotly/graph_objs/layout/template/data/_isosurface.py | 1 + plotly/graph_objs/layout/template/data/_mesh3d.py | 1 + plotly/graph_objs/layout/template/data/_ohlc.py | 1 + plotly/graph_objs/layout/template/data/_parcats.py | 1 + plotly/graph_objs/layout/template/data/_parcoords.py | 1 + plotly/graph_objs/layout/template/data/_pie.py | 1 + plotly/graph_objs/layout/template/data/_sankey.py | 1 + plotly/graph_objs/layout/template/data/_scatter.py | 1 + plotly/graph_objs/layout/template/data/_scatter3d.py | 1 + plotly/graph_objs/layout/template/data/_scattercarpet.py | 1 + plotly/graph_objs/layout/template/data/_scattergeo.py | 1 + plotly/graph_objs/layout/template/data/_scattergl.py | 1 + plotly/graph_objs/layout/template/data/_scattermap.py | 1 + plotly/graph_objs/layout/template/data/_scattermapbox.py | 1 + plotly/graph_objs/layout/template/data/_scatterpolar.py | 1 + plotly/graph_objs/layout/template/data/_scatterpolargl.py | 1 + plotly/graph_objs/layout/template/data/_scattersmith.py | 1 + plotly/graph_objs/layout/template/data/_scatterternary.py | 1 + plotly/graph_objs/layout/template/data/_splom.py | 1 + plotly/graph_objs/layout/template/data/_streamtube.py | 1 + plotly/graph_objs/layout/template/data/_sunburst.py | 1 + plotly/graph_objs/layout/template/data/_surface.py | 1 + plotly/graph_objs/layout/template/data/_table.py | 1 + plotly/graph_objs/layout/template/data/_treemap.py | 1 + plotly/graph_objs/layout/template/data/_violin.py | 1 + plotly/graph_objs/layout/template/data/_volume.py | 1 + plotly/graph_objs/layout/template/data/_waterfall.py | 1 + tests/test_core/test_shapes/test_add_hline_empty_subplots.py | 1 + 51 files changed, 51 insertions(+) diff --git a/plotly/graph_objs/layout/template/_layout.py b/plotly/graph_objs/layout/template/_layout.py index e69de29bb2..058b60b807 100644 --- a/plotly/graph_objs/layout/template/_layout.py +++ b/plotly/graph_objs/layout/template/_layout.py @@ -0,0 +1 @@ +from plotly.graph_objs import Layout diff --git a/plotly/graph_objs/layout/template/data/_bar.py b/plotly/graph_objs/layout/template/data/_bar.py index e69de29bb2..5a800e6408 100644 --- a/plotly/graph_objs/layout/template/data/_bar.py +++ b/plotly/graph_objs/layout/template/data/_bar.py @@ -0,0 +1 @@ +from plotly.graph_objs import Bar diff --git a/plotly/graph_objs/layout/template/data/_barpolar.py b/plotly/graph_objs/layout/template/data/_barpolar.py index e69de29bb2..18abed8bbb 100644 --- a/plotly/graph_objs/layout/template/data/_barpolar.py +++ b/plotly/graph_objs/layout/template/data/_barpolar.py @@ -0,0 +1 @@ +from plotly.graph_objs import Barpolar diff --git a/plotly/graph_objs/layout/template/data/_box.py b/plotly/graph_objs/layout/template/data/_box.py index e69de29bb2..ffdd1d9213 100644 --- a/plotly/graph_objs/layout/template/data/_box.py +++ b/plotly/graph_objs/layout/template/data/_box.py @@ -0,0 +1 @@ +from plotly.graph_objs import Box diff --git a/plotly/graph_objs/layout/template/data/_candlestick.py b/plotly/graph_objs/layout/template/data/_candlestick.py index e69de29bb2..5d11b44859 100644 --- a/plotly/graph_objs/layout/template/data/_candlestick.py +++ b/plotly/graph_objs/layout/template/data/_candlestick.py @@ -0,0 +1 @@ +from plotly.graph_objs import Candlestick diff --git a/plotly/graph_objs/layout/template/data/_carpet.py b/plotly/graph_objs/layout/template/data/_carpet.py index e69de29bb2..b923d73904 100644 --- a/plotly/graph_objs/layout/template/data/_carpet.py +++ b/plotly/graph_objs/layout/template/data/_carpet.py @@ -0,0 +1 @@ +from plotly.graph_objs import Carpet diff --git a/plotly/graph_objs/layout/template/data/_choropleth.py b/plotly/graph_objs/layout/template/data/_choropleth.py index e69de29bb2..733e12709c 100644 --- a/plotly/graph_objs/layout/template/data/_choropleth.py +++ b/plotly/graph_objs/layout/template/data/_choropleth.py @@ -0,0 +1 @@ +from plotly.graph_objs import Choropleth diff --git a/plotly/graph_objs/layout/template/data/_choroplethmap.py b/plotly/graph_objs/layout/template/data/_choroplethmap.py index e69de29bb2..855102a43f 100644 --- a/plotly/graph_objs/layout/template/data/_choroplethmap.py +++ b/plotly/graph_objs/layout/template/data/_choroplethmap.py @@ -0,0 +1 @@ +from plotly.graph_objs import Choroplethmap diff --git a/plotly/graph_objs/layout/template/data/_choroplethmapbox.py b/plotly/graph_objs/layout/template/data/_choroplethmapbox.py index e69de29bb2..220b93564e 100644 --- a/plotly/graph_objs/layout/template/data/_choroplethmapbox.py +++ b/plotly/graph_objs/layout/template/data/_choroplethmapbox.py @@ -0,0 +1 @@ +from plotly.graph_objs import Choroplethmapbox diff --git a/plotly/graph_objs/layout/template/data/_cone.py b/plotly/graph_objs/layout/template/data/_cone.py index e69de29bb2..7a284527a8 100644 --- a/plotly/graph_objs/layout/template/data/_cone.py +++ b/plotly/graph_objs/layout/template/data/_cone.py @@ -0,0 +1 @@ +from plotly.graph_objs import Cone diff --git a/plotly/graph_objs/layout/template/data/_contour.py b/plotly/graph_objs/layout/template/data/_contour.py index e69de29bb2..e474909a4d 100644 --- a/plotly/graph_objs/layout/template/data/_contour.py +++ b/plotly/graph_objs/layout/template/data/_contour.py @@ -0,0 +1 @@ +from plotly.graph_objs import Contour diff --git a/plotly/graph_objs/layout/template/data/_contourcarpet.py b/plotly/graph_objs/layout/template/data/_contourcarpet.py index e69de29bb2..6240faf510 100644 --- a/plotly/graph_objs/layout/template/data/_contourcarpet.py +++ b/plotly/graph_objs/layout/template/data/_contourcarpet.py @@ -0,0 +1 @@ +from plotly.graph_objs import Contourcarpet diff --git a/plotly/graph_objs/layout/template/data/_densitymap.py b/plotly/graph_objs/layout/template/data/_densitymap.py index e69de29bb2..c73e108c7c 100644 --- a/plotly/graph_objs/layout/template/data/_densitymap.py +++ b/plotly/graph_objs/layout/template/data/_densitymap.py @@ -0,0 +1 @@ +from plotly.graph_objs import Densitymap diff --git a/plotly/graph_objs/layout/template/data/_densitymapbox.py b/plotly/graph_objs/layout/template/data/_densitymapbox.py index e69de29bb2..d655b21ab3 100644 --- a/plotly/graph_objs/layout/template/data/_densitymapbox.py +++ b/plotly/graph_objs/layout/template/data/_densitymapbox.py @@ -0,0 +1 @@ +from plotly.graph_objs import Densitymapbox diff --git a/plotly/graph_objs/layout/template/data/_funnel.py b/plotly/graph_objs/layout/template/data/_funnel.py index e69de29bb2..70e2ba74d4 100644 --- a/plotly/graph_objs/layout/template/data/_funnel.py +++ b/plotly/graph_objs/layout/template/data/_funnel.py @@ -0,0 +1 @@ +from plotly.graph_objs import Funnel diff --git a/plotly/graph_objs/layout/template/data/_funnelarea.py b/plotly/graph_objs/layout/template/data/_funnelarea.py index e69de29bb2..242d0fcc96 100644 --- a/plotly/graph_objs/layout/template/data/_funnelarea.py +++ b/plotly/graph_objs/layout/template/data/_funnelarea.py @@ -0,0 +1 @@ +from plotly.graph_objs import Funnelarea diff --git a/plotly/graph_objs/layout/template/data/_heatmap.py b/plotly/graph_objs/layout/template/data/_heatmap.py index e69de29bb2..6098ee83e7 100644 --- a/plotly/graph_objs/layout/template/data/_heatmap.py +++ b/plotly/graph_objs/layout/template/data/_heatmap.py @@ -0,0 +1 @@ +from plotly.graph_objs import Heatmap diff --git a/plotly/graph_objs/layout/template/data/_histogram.py b/plotly/graph_objs/layout/template/data/_histogram.py index e69de29bb2..7ba4c6df2f 100644 --- a/plotly/graph_objs/layout/template/data/_histogram.py +++ b/plotly/graph_objs/layout/template/data/_histogram.py @@ -0,0 +1 @@ +from plotly.graph_objs import Histogram diff --git a/plotly/graph_objs/layout/template/data/_histogram2d.py b/plotly/graph_objs/layout/template/data/_histogram2d.py index e69de29bb2..710f7f9929 100644 --- a/plotly/graph_objs/layout/template/data/_histogram2d.py +++ b/plotly/graph_objs/layout/template/data/_histogram2d.py @@ -0,0 +1 @@ +from plotly.graph_objs import Histogram2d diff --git a/plotly/graph_objs/layout/template/data/_histogram2dcontour.py b/plotly/graph_objs/layout/template/data/_histogram2dcontour.py index e69de29bb2..94af41aa92 100644 --- a/plotly/graph_objs/layout/template/data/_histogram2dcontour.py +++ b/plotly/graph_objs/layout/template/data/_histogram2dcontour.py @@ -0,0 +1 @@ +from plotly.graph_objs import Histogram2dContour diff --git a/plotly/graph_objs/layout/template/data/_icicle.py b/plotly/graph_objs/layout/template/data/_icicle.py index e69de29bb2..6749cbe60a 100644 --- a/plotly/graph_objs/layout/template/data/_icicle.py +++ b/plotly/graph_objs/layout/template/data/_icicle.py @@ -0,0 +1 @@ +from plotly.graph_objs import Icicle diff --git a/plotly/graph_objs/layout/template/data/_image.py b/plotly/graph_objs/layout/template/data/_image.py index e69de29bb2..828920ac69 100644 --- a/plotly/graph_objs/layout/template/data/_image.py +++ b/plotly/graph_objs/layout/template/data/_image.py @@ -0,0 +1 @@ +from plotly.graph_objs import Image diff --git a/plotly/graph_objs/layout/template/data/_indicator.py b/plotly/graph_objs/layout/template/data/_indicator.py index e69de29bb2..a5a488f8bb 100644 --- a/plotly/graph_objs/layout/template/data/_indicator.py +++ b/plotly/graph_objs/layout/template/data/_indicator.py @@ -0,0 +1 @@ +from plotly.graph_objs import Indicator diff --git a/plotly/graph_objs/layout/template/data/_isosurface.py b/plotly/graph_objs/layout/template/data/_isosurface.py index e69de29bb2..5a7885ab64 100644 --- a/plotly/graph_objs/layout/template/data/_isosurface.py +++ b/plotly/graph_objs/layout/template/data/_isosurface.py @@ -0,0 +1 @@ +from plotly.graph_objs import Isosurface diff --git a/plotly/graph_objs/layout/template/data/_mesh3d.py b/plotly/graph_objs/layout/template/data/_mesh3d.py index e69de29bb2..2172a23bd4 100644 --- a/plotly/graph_objs/layout/template/data/_mesh3d.py +++ b/plotly/graph_objs/layout/template/data/_mesh3d.py @@ -0,0 +1 @@ +from plotly.graph_objs import Mesh3d diff --git a/plotly/graph_objs/layout/template/data/_ohlc.py b/plotly/graph_objs/layout/template/data/_ohlc.py index e69de29bb2..d3f857428c 100644 --- a/plotly/graph_objs/layout/template/data/_ohlc.py +++ b/plotly/graph_objs/layout/template/data/_ohlc.py @@ -0,0 +1 @@ +from plotly.graph_objs import Ohlc diff --git a/plotly/graph_objs/layout/template/data/_parcats.py b/plotly/graph_objs/layout/template/data/_parcats.py index e69de29bb2..9b0290bcce 100644 --- a/plotly/graph_objs/layout/template/data/_parcats.py +++ b/plotly/graph_objs/layout/template/data/_parcats.py @@ -0,0 +1 @@ +from plotly.graph_objs import Parcats diff --git a/plotly/graph_objs/layout/template/data/_parcoords.py b/plotly/graph_objs/layout/template/data/_parcoords.py index e69de29bb2..ccf5629c54 100644 --- a/plotly/graph_objs/layout/template/data/_parcoords.py +++ b/plotly/graph_objs/layout/template/data/_parcoords.py @@ -0,0 +1 @@ +from plotly.graph_objs import Parcoords diff --git a/plotly/graph_objs/layout/template/data/_pie.py b/plotly/graph_objs/layout/template/data/_pie.py index e69de29bb2..0625fd2888 100644 --- a/plotly/graph_objs/layout/template/data/_pie.py +++ b/plotly/graph_objs/layout/template/data/_pie.py @@ -0,0 +1 @@ +from plotly.graph_objs import Pie diff --git a/plotly/graph_objs/layout/template/data/_sankey.py b/plotly/graph_objs/layout/template/data/_sankey.py index e69de29bb2..b572f657ce 100644 --- a/plotly/graph_objs/layout/template/data/_sankey.py +++ b/plotly/graph_objs/layout/template/data/_sankey.py @@ -0,0 +1 @@ +from plotly.graph_objs import Sankey diff --git a/plotly/graph_objs/layout/template/data/_scatter.py b/plotly/graph_objs/layout/template/data/_scatter.py index e69de29bb2..afcfab30af 100644 --- a/plotly/graph_objs/layout/template/data/_scatter.py +++ b/plotly/graph_objs/layout/template/data/_scatter.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatter diff --git a/plotly/graph_objs/layout/template/data/_scatter3d.py b/plotly/graph_objs/layout/template/data/_scatter3d.py index e69de29bb2..93146220e3 100644 --- a/plotly/graph_objs/layout/template/data/_scatter3d.py +++ b/plotly/graph_objs/layout/template/data/_scatter3d.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatter3d diff --git a/plotly/graph_objs/layout/template/data/_scattercarpet.py b/plotly/graph_objs/layout/template/data/_scattercarpet.py index e69de29bb2..26d87ca7c1 100644 --- a/plotly/graph_objs/layout/template/data/_scattercarpet.py +++ b/plotly/graph_objs/layout/template/data/_scattercarpet.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattercarpet diff --git a/plotly/graph_objs/layout/template/data/_scattergeo.py b/plotly/graph_objs/layout/template/data/_scattergeo.py index e69de29bb2..34308e1a08 100644 --- a/plotly/graph_objs/layout/template/data/_scattergeo.py +++ b/plotly/graph_objs/layout/template/data/_scattergeo.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattergeo diff --git a/plotly/graph_objs/layout/template/data/_scattergl.py b/plotly/graph_objs/layout/template/data/_scattergl.py index e69de29bb2..30bd3712b8 100644 --- a/plotly/graph_objs/layout/template/data/_scattergl.py +++ b/plotly/graph_objs/layout/template/data/_scattergl.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattergl diff --git a/plotly/graph_objs/layout/template/data/_scattermap.py b/plotly/graph_objs/layout/template/data/_scattermap.py index e69de29bb2..5a494e2320 100644 --- a/plotly/graph_objs/layout/template/data/_scattermap.py +++ b/plotly/graph_objs/layout/template/data/_scattermap.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattermap diff --git a/plotly/graph_objs/layout/template/data/_scattermapbox.py b/plotly/graph_objs/layout/template/data/_scattermapbox.py index e69de29bb2..6c3333aa94 100644 --- a/plotly/graph_objs/layout/template/data/_scattermapbox.py +++ b/plotly/graph_objs/layout/template/data/_scattermapbox.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattermapbox diff --git a/plotly/graph_objs/layout/template/data/_scatterpolar.py b/plotly/graph_objs/layout/template/data/_scatterpolar.py index e69de29bb2..e1417b2381 100644 --- a/plotly/graph_objs/layout/template/data/_scatterpolar.py +++ b/plotly/graph_objs/layout/template/data/_scatterpolar.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatterpolar diff --git a/plotly/graph_objs/layout/template/data/_scatterpolargl.py b/plotly/graph_objs/layout/template/data/_scatterpolargl.py index e69de29bb2..60b023a581 100644 --- a/plotly/graph_objs/layout/template/data/_scatterpolargl.py +++ b/plotly/graph_objs/layout/template/data/_scatterpolargl.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatterpolargl diff --git a/plotly/graph_objs/layout/template/data/_scattersmith.py b/plotly/graph_objs/layout/template/data/_scattersmith.py index e69de29bb2..e2dcf41bd0 100644 --- a/plotly/graph_objs/layout/template/data/_scattersmith.py +++ b/plotly/graph_objs/layout/template/data/_scattersmith.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scattersmith diff --git a/plotly/graph_objs/layout/template/data/_scatterternary.py b/plotly/graph_objs/layout/template/data/_scatterternary.py index e69de29bb2..2221eadd54 100644 --- a/plotly/graph_objs/layout/template/data/_scatterternary.py +++ b/plotly/graph_objs/layout/template/data/_scatterternary.py @@ -0,0 +1 @@ +from plotly.graph_objs import Scatterternary diff --git a/plotly/graph_objs/layout/template/data/_splom.py b/plotly/graph_objs/layout/template/data/_splom.py index e69de29bb2..0909cdfd9d 100644 --- a/plotly/graph_objs/layout/template/data/_splom.py +++ b/plotly/graph_objs/layout/template/data/_splom.py @@ -0,0 +1 @@ +from plotly.graph_objs import Splom diff --git a/plotly/graph_objs/layout/template/data/_streamtube.py b/plotly/graph_objs/layout/template/data/_streamtube.py index e69de29bb2..8b23c3161c 100644 --- a/plotly/graph_objs/layout/template/data/_streamtube.py +++ b/plotly/graph_objs/layout/template/data/_streamtube.py @@ -0,0 +1 @@ +from plotly.graph_objs import Streamtube diff --git a/plotly/graph_objs/layout/template/data/_sunburst.py b/plotly/graph_objs/layout/template/data/_sunburst.py index e69de29bb2..1b9511c7d5 100644 --- a/plotly/graph_objs/layout/template/data/_sunburst.py +++ b/plotly/graph_objs/layout/template/data/_sunburst.py @@ -0,0 +1 @@ +from plotly.graph_objs import Sunburst diff --git a/plotly/graph_objs/layout/template/data/_surface.py b/plotly/graph_objs/layout/template/data/_surface.py index e69de29bb2..cfaa55d738 100644 --- a/plotly/graph_objs/layout/template/data/_surface.py +++ b/plotly/graph_objs/layout/template/data/_surface.py @@ -0,0 +1 @@ +from plotly.graph_objs import Surface diff --git a/plotly/graph_objs/layout/template/data/_table.py b/plotly/graph_objs/layout/template/data/_table.py index e69de29bb2..2b6d4ad1e5 100644 --- a/plotly/graph_objs/layout/template/data/_table.py +++ b/plotly/graph_objs/layout/template/data/_table.py @@ -0,0 +1 @@ +from plotly.graph_objs import Table diff --git a/plotly/graph_objs/layout/template/data/_treemap.py b/plotly/graph_objs/layout/template/data/_treemap.py index e69de29bb2..5c648e7108 100644 --- a/plotly/graph_objs/layout/template/data/_treemap.py +++ b/plotly/graph_objs/layout/template/data/_treemap.py @@ -0,0 +1 @@ +from plotly.graph_objs import Treemap diff --git a/plotly/graph_objs/layout/template/data/_violin.py b/plotly/graph_objs/layout/template/data/_violin.py index e69de29bb2..23221b6677 100644 --- a/plotly/graph_objs/layout/template/data/_violin.py +++ b/plotly/graph_objs/layout/template/data/_violin.py @@ -0,0 +1 @@ +from plotly.graph_objs import Violin diff --git a/plotly/graph_objs/layout/template/data/_volume.py b/plotly/graph_objs/layout/template/data/_volume.py index e69de29bb2..1128580ca0 100644 --- a/plotly/graph_objs/layout/template/data/_volume.py +++ b/plotly/graph_objs/layout/template/data/_volume.py @@ -0,0 +1 @@ +from plotly.graph_objs import Volume diff --git a/plotly/graph_objs/layout/template/data/_waterfall.py b/plotly/graph_objs/layout/template/data/_waterfall.py index e69de29bb2..c45e7852a2 100644 --- a/plotly/graph_objs/layout/template/data/_waterfall.py +++ b/plotly/graph_objs/layout/template/data/_waterfall.py @@ -0,0 +1 @@ +from plotly.graph_objs import Waterfall diff --git a/tests/test_core/test_shapes/test_add_hline_empty_subplots.py b/tests/test_core/test_shapes/test_add_hline_empty_subplots.py index 60396de3d9..f14225a36d 100644 --- a/tests/test_core/test_shapes/test_add_hline_empty_subplots.py +++ b/tests/test_core/test_shapes/test_add_hline_empty_subplots.py @@ -1,4 +1,5 @@ import pytest +import plotly.graph_objects as go from plotly.subplots import make_subplots