Skip to content

Commit 961fd83

Browse files
pvelascoyarikoptic
andauthored
Replace type check with isinstance
Co-authored-by: Yaroslav Halchenko <[email protected]>
1 parent 312e139 commit 961fd83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

heudiconv/bids.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,8 @@ def find_compatible_fmaps_for_session(path_to_bids_session, matching_parameters)
712712
compatible_fmap : dict
713713
Dict of compatible_fmaps_groups (values) for each non-fmap run (keys)
714714
"""
715-
if type(matching_parameters) is not list:
715+
if not isinstance(matching_parameters, list):
716+
assert isinstance(matching_parameters, str), "matching_parameters must be a str or a list, got %s" % matching_parameters
716717
matching_parameters = [matching_parameters]
717718
for param in matching_parameters:
718719
if param not in AllowedFmapParameterMatching:

0 commit comments

Comments
 (0)