Skip to content

Commit fc22c92

Browse files
committed
ENH: flake8 - use kwarg maxsplit in re.split
1 parent bf9b75b commit fc22c92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

heudiconv/heuristics/reproin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,9 @@ def infotoids(seqinfos: Iterable[SeqInfo], outdir: str) -> dict[str, Optional[st
742742
# TODO: fix up subject id if missing some 0s
743743
if study_description:
744744
# Generally it is a ^ but if entered manually, ppl place space in it
745-
split = re.split("[ ^]", study_description, 1)
746-
# split first one even more, since couldbe PI_Student or PI-Student
747-
split = re.split("-|_", split[0], 1) + split[1:]
745+
split = re.split("[ ^]", study_description, maxsplit=1)
746+
# split first one even more, since could be PI_Student or PI-Student
747+
split = re.split("-|_", split[0], maxsplit=1) + split[1:]
748748

749749
# locator = study_description.replace('^', '/')
750750
locator = "/".join(split)

0 commit comments

Comments
 (0)