Skip to content

Commit d52a1f3

Browse files
committed
STY: Raise exception if DWI model is not found
Raise exception if DWI model is not found. Fixes: ``` Local variable 'model' might be referenced before assignment ``` raised locally by the IDE.
1 parent 0e2276b commit d52a1f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/nifreeze/model/dmri.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ def _fit(self, index: int | None = None, n_jobs: int | None = None, **kwargs):
132132
import_module(module_name),
133133
class_name,
134134
)(gtab, **kwargs)
135+
else:
136+
raise NotImplementedError(f"{model_str} not implemented.")
135137

136138
fit_kwargs: dict[str, Any] = {} # Add here keyword arguments
137139

0 commit comments

Comments
 (0)