Skip to content

Commit

Permalink
Fix the regexs in the python code here to be raw strings. (#414)
Browse files Browse the repository at this point in the history
Otherwise we can get SyntaxWarnings on modern versions of
Python.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Dec 20, 2024
1 parent a671e22 commit 4c4bb97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docutils_transforms_reps.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def apply(self):
elif name in ('replaces', 'replaced-by', 'requires'):
newbody = []
space = nodes.Text(' ')
for refrep in re.split(',?\s+', body.astext()):
for refrep in re.split(r',?\s+', body.astext()):
repno = int(refrep)
newbody.append(nodes.reference(
refrep, refrep,
Expand Down
2 changes: 1 addition & 1 deletion rep0/rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _parse_author(self, data):
author_list = []
for regex in (angled, paren, simple):
# Watch out for commas separating multiple names.
regex += u'(,\s*)?'
regex += r'(,\s*)?'
for match in re.finditer(regex, data):
# Watch out for suffixes like 'Jr.' when they are
# comma-separated from the name and thus cause issues when
Expand Down

0 comments on commit 4c4bb97

Please sign in to comment.