Skip to content

Commit 198dfbe

Browse files
committed
BF: address DepWarn about invalid escapes -- give those "r"
1 parent 2305f5f commit 198dfbe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

heudiconv/heuristics/reproin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ def fixup_subjectid(subjectid):
918918
"""Just in case someone managed to miss a zero or added an extra one"""
919919
# make it lowercase
920920
subjectid = subjectid.lower()
921-
reg = re.match("sid0*(\d+)$", subjectid)
921+
reg = re.match(r"sid0*(\d+)$", subjectid)
922922
if not reg:
923923
# some completely other pattern
924924
# just filter out possible _- in it

heudiconv/heuristics/test_reproin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_fix_dbic_protocol():
114114
seqinfos = [seq1, seq2]
115115
protocols2fix = {
116116
md5sum('mystudy'):
117-
[('scout_run\+', 'THESCOUT-runX'),
117+
[(r'scout_run\+', 'THESCOUT-runX'),
118118
('run-life[0-9]', 'run+_task-life')],
119119
re.compile('^my.*'):
120120
[('THESCOUT-runX', 'THESCOUT')],
@@ -221,4 +221,4 @@ def test_parse_series_spec():
221221
{'datatype': 'func', 'session': '{date}'}
222222

223223
assert pdpn("fmap_dir-AP_ses-01") == \
224-
{'datatype': 'fmap', 'session': '01', 'dir': 'AP'}
224+
{'datatype': 'fmap', 'session': '01', 'dir': 'AP'}

0 commit comments

Comments
 (0)