Skip to content

Commit ac0164a

Browse files
committed
ENH: flake8 - use kwarg maxsplit in re.split
1 parent 9e2636d commit ac0164a

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
@@ -764,9 +764,9 @@ def infotoids(seqinfos: Iterable[SeqInfo], outdir: str) -> dict[str, Optional[st
764764
# TODO: fix up subject id if missing some 0s
765765
if study_description:
766766
# Generally it is a ^ but if entered manually, ppl place space in it
767-
split = re.split("[ ^]", study_description, 1)
768-
# split first one even more, since couldbe PI_Student or PI-Student
769-
split = re.split("-|_", split[0], 1) + split[1:]
767+
split = re.split("[ ^]", study_description, maxsplit=1)
768+
# split first one even more, since could be PI_Student or PI-Student
769+
split = re.split("-|_", split[0], maxsplit=1) + split[1:]
770770

771771
# locator = study_description.replace('^', '/')
772772
locator = "/".join(split)

0 commit comments

Comments
 (0)