Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f325010

Browse files
committed
Stronger testing for update argument in plot_mpl.
1 parent acc68a1 commit f325010

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plotly/plotly/plotly.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def iplot_mpl(fig, resize=True, strip_style=False, update=None, **plot_options):
225225
err.add_note("Your updated figure could not be properly validated.")
226226
err.prepare()
227227
raise
228-
elif update:
228+
elif update is not None:
229229
raise exceptions.PlotlyGraphObjectError(
230230
"'update' must be dictionary-like and a valid plotly Figure "
231231
"object. Run 'help(plotly.graph_objs.Figure)' for more info."
@@ -263,7 +263,7 @@ def plot_mpl(fig, resize=True, strip_style=False, update=None, **plot_options):
263263
err.add_note("Your updated figure could not be properly validated.")
264264
err.prepare()
265265
raise
266-
elif update:
266+
elif update is not None:
267267
raise exceptions.PlotlyGraphObjectError(
268268
"'update' must be dictionary-like and a valid plotly Figure "
269269
"object. Run 'help(plotly.graph_objs.Figure)' for more info."

0 commit comments

Comments
 (0)