[ENH] Throw error when extra kwargs are given to glm.first_level.first_level_from_bids
#4357
Closed
1 task done
glm.first_level.first_level_from_bids
#4357
Is there an existing issue for this?
Describe your proposed enhancement in detail.
nilearn.glm.first_level.first_level_from_bids
takes kwargs, and passes kwargs that have theconfounds_
prefix to another function. However, the remaining kwargs are not checked and nothing happens if for example the confound kwargs are not given correctly (e.g. with typoconfound_
instead ofconfounds_
).I think it would be nice/useful to throw a runtime error or something when that happens (first mentioned in PR #4352). Would be happy to work on this too.
Benefits to the change
Better debugging when invalid/unknown kwargs are given.
Pseudocode for the new behavior, if applicable
No response
The text was updated successfully, but these errors were encountered: