mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-16 11:21:25 +08:00
Fixes a bug in _update_doc in skimage/io/__init__.py that will attempt to compute max of empty list if no plugins are found.
This commit is contained in:
@@ -40,7 +40,8 @@ def _update_doc(doc):
|
||||
info_table = [(p, plugin_info(p).get('description', 'no description'))
|
||||
for p in available_plugins if not p == 'test']
|
||||
|
||||
name_length = max([len(n) for (n, _) in info_table])
|
||||
name_length = max([len(n) for (n, _) in info_table]) if len(info_table) > 0 else 0
|
||||
|
||||
description_length = WRAP_LEN - 1 - name_length
|
||||
column_lengths = [name_length, description_length]
|
||||
_format_plugin_info_table(info_table, column_lengths)
|
||||
|
||||
Reference in New Issue
Block a user