Skip to content

Commit 531842e

Browse files
committed
Improve error message as suggested by @matthew-brett
1 parent 3d64f95 commit 531842e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nibabel/streamlines/tractogram.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def __getitem__(self, key):
167167
def __setitem__(self, key, value):
168168
if not callable(value):
169169
msg = ("Values in a `LazyDict` must be generator functions."
170-
" Those are functions which whenever are called return an"
170+
" These are functions which, when called, return an"
171171
" instantiated generator.")
172172
raise TypeError(msg)
173173
self.store[key] = value
@@ -608,8 +608,8 @@ def _apply_affine():
608608
def _set_streamlines(self, value):
609609
if value is not None and not callable(value):
610610
msg = ("`streamlines` must be a generator function. That is a"
611-
" function which whenever is called returns an"
612-
" instantiated generator.")
611+
" function which, when called, returns an instantiated"
612+
" generator.")
613613
raise TypeError(msg)
614614
self._streamlines = value
615615

0 commit comments

Comments
 (0)