Skip to content

Commit 16ae5e8

Browse files
committed
Document function parameters
1 parent e3e350f commit 16ae5e8

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/skimage/_shared/testing.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,24 @@ def mono_check(plugin, fmt='png'):
194194

195195

196196
def fetch(data_filename, prefix=None):
197-
"""Attempt to fetch data, but if unavailable, skip the tests."""
197+
"""Attempt to fetch data, but if unavailable, skip the tests.
198+
199+
Parameters
200+
----------
201+
data_filename : str
202+
File path in the scikit-image repo tree, e.g.,
203+
'restoration/camera_rl.npy', possibly pointing to a remote location.
204+
205+
prefix : str, optional
206+
If None, `data_filename` is prefixed by 'src/skimage'
207+
If 'tests', `data_filename` is prefixed by 'tests/skimage'.
208+
209+
Returns
210+
-------
211+
file_path : str
212+
Path of the local file, possibly pointing to a remote location.
213+
214+
"""
198215
try:
199216
return _fetch(data_filename, prefix=prefix)
200217
except (ConnectionError, ModuleNotFoundError):

0 commit comments

Comments
 (0)