Skip to content

Commit 4c4bb97

Browse files
authored
Fix the regexs in the python code here to be raw strings. (#414)
Otherwise we can get SyntaxWarnings on modern versions of Python. Signed-off-by: Chris Lalancette <[email protected]>
1 parent a671e22 commit 4c4bb97

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docutils_transforms_reps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def apply(self):
113113
elif name in ('replaces', 'replaced-by', 'requires'):
114114
newbody = []
115115
space = nodes.Text(' ')
116-
for refrep in re.split(',?\s+', body.astext()):
116+
for refrep in re.split(r',?\s+', body.astext()):
117117
repno = int(refrep)
118118
newbody.append(nodes.reference(
119119
refrep, refrep,

rep0/rep.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def _parse_author(self, data):
229229
author_list = []
230230
for regex in (angled, paren, simple):
231231
# Watch out for commas separating multiple names.
232-
regex += u'(,\s*)?'
232+
regex += r'(,\s*)?'
233233
for match in re.finditer(regex, data):
234234
# Watch out for suffixes like 'Jr.' when they are
235235
# comma-separated from the name and thus cause issues when

0 commit comments

Comments
 (0)