Skip to content

Commit b6b693a

Browse files
Merge pull request #3714 from plotly/more_types
missed some type annotations
2 parents 1afc30d + 10f39df commit b6b693a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Diff for: packages/python/plotly/codegen/figure.py

+1
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ def add_{method_prefix}{singular_name}(self"""
644644
node.child_datatypes,
645645
prepend_extras=["arg"],
646646
append_extras=["row", "col", "secondary_y", "exclude_empty_subplots"],
647+
output_type=fig_classname,
647648
)
648649

649650
prepend_extras = [

Diff for: packages/python/plotly/plotly/graph_objs/_figure.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21785,7 +21785,7 @@ def add_annotation(
2178521785
secondary_y=None,
2178621786
exclude_empty_subplots=None,
2178721787
**kwargs,
21788-
):
21788+
) -> "Figure":
2178921789
"""
2179021790
Create and add a new annotation to the figure's layout
2179121791

@@ -22334,7 +22334,7 @@ def add_layout_image(
2233422334
secondary_y=None,
2233522335
exclude_empty_subplots=None,
2233622336
**kwargs,
22337-
):
22337+
) -> "Figure":
2233822338
"""
2233922339
Create and add a new image to the figure's layout
2234022340

@@ -22665,7 +22665,7 @@ def add_shape(
2266522665
secondary_y=None,
2266622666
exclude_empty_subplots=None,
2266722667
**kwargs,
22668-
):
22668+
) -> "Figure":
2266922669
"""
2267022670
Create and add a new shape to the figure's layout
2267122671

Diff for: packages/python/plotly/plotly/graph_objs/_figurewidget.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21791,7 +21791,7 @@ def add_annotation(
2179121791
secondary_y=None,
2179221792
exclude_empty_subplots=None,
2179321793
**kwargs,
21794-
):
21794+
) -> "FigureWidget":
2179521795
"""
2179621796
Create and add a new annotation to the figure's layout
2179721797

@@ -22340,7 +22340,7 @@ def add_layout_image(
2234022340
secondary_y=None,
2234122341
exclude_empty_subplots=None,
2234222342
**kwargs,
22343-
):
22343+
) -> "FigureWidget":
2234422344
"""
2234522345
Create and add a new image to the figure's layout
2234622346

@@ -22671,7 +22671,7 @@ def add_shape(
2267122671
secondary_y=None,
2267222672
exclude_empty_subplots=None,
2267322673
**kwargs,
22674-
):
22674+
) -> "FigureWidget":
2267522675
"""
2267622676
Create and add a new shape to the figure's layout
2267722677

0 commit comments

Comments
 (0)