@@ -295,12 +295,8 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
295
295
296
296
if image :
297
297
if image not in __IMAGE_FORMATS :
298
- img_n = len (__IMAGE_FORMATS )
299
- raise ValueError ('The image parameter takes only the '
300
- 'following format types: `{}`, `{}`, '
301
- '`{}`, `{}`' .format (* [__IMAGE_FORMATS [i ]
302
- for i in range (img_n )]
303
- )
298
+ raise ValueError ('The image parameter must be one of the following'
299
+ ': {}' .format (__IMAGE_FORMATS )
304
300
)
305
301
# if image is given, and is a valid format, we will download the image
306
302
script = get_image_download_script ('iplot' ).format (format = image ,
@@ -417,12 +413,8 @@ def plot(figure_or_data,
417
413
418
414
if image :
419
415
if image not in __IMAGE_FORMATS :
420
- img_n = len (__IMAGE_FORMATS )
421
- raise ValueError ('The image parameter takes only the '
422
- 'following format types: `{}`, `{}`, '
423
- '`{}`, `{}`' .format (* [__IMAGE_FORMATS [i ]
424
- for i in range (img_n )]
425
- )
416
+ raise ValueError ('The image parameter must be one of the '
417
+ 'following: {}' .format (__IMAGE_FORMATS )
426
418
)
427
419
# if the check passes then download script is injected.
428
420
# write the download script:
0 commit comments