Skip to content

Commit

Permalink
pass raw string to re.compile
Browse files Browse the repository at this point in the history
  • Loading branch information
nikohansen committed Nov 22, 2023
1 parent 9c82484 commit ebf276b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code-postprocessing/cocopp/pproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3183,7 +3183,7 @@ def parseinfo(s):
Keys should not use comma or quote characters.
"""
p = re.compile('\ *([^,=]+?)\ *=\ *(".+?"|\'.+?\'|[^,]+)\ *(?=,|$)')
p = re.compile(r'\ *([^,=]+?)\ *=\ *(".+?"|\'.+?\'|[^,]+)\ *(?=,|$)')
res = []
for elem0, elem1 in p.findall(s):
if elem1.startswith('\'') and elem1.endswith('\''): # HACK
Expand Down

0 comments on commit ebf276b

Please sign in to comment.