Skip to content

Commit dce8e23

Browse files
committed
ENH: reproin - warning on empty suffix should not be issued if unparsed bids portion has it
1 parent 2c9e5ec commit dce8e23

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

heudiconv/heuristics/reproin.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,14 @@ def infotodict(seqinfo):
611611
seqtype_label = 'sbref'
612612

613613
if not seqtype_label:
614-
lgr.warning("We ended up with an empty label/suffix for %r", series_spec)
614+
# Might be provided by the bids ending within series_spec, we would
615+
# just want to check if that the last element is not _key-value pair
616+
bids_ending = series_info.get('bids', None)
617+
if not bids_ending \
618+
or "-" in bids_ending.split('_')[-1]:
619+
lgr.warning(
620+
"We ended up with an empty label/suffix for %r",
621+
series_spec)
615622

616623
run = series_info.get('run')
617624
if run is not None:

0 commit comments

Comments
 (0)