python: use raw strings when appropriate

We had some incorrectly escaped strings that are now causing
SyntaxWarnings with Python 3.12

* bin/options.py, python/spot/aux_.py, python/spot/ltsmin.i,
python/spot/__init__.py: Here.
* NEWS: Mention the fix.
This commit is contained in:
Alexandre Duret-Lutz 2024-05-03 00:05:33 +02:00
parent dbe31c72c8
commit e6362b785b
5 changed files with 16 additions and 13 deletions

View file

@ -51,7 +51,7 @@ def extend(*classes):
# parameter is inverted. https://gitlab.com/graphviz/graphviz/issues/1605
# In our case, the scale parameters should both be <= 1, so we can
# detect when that is not the case.
svgscale_regex = re.compile('transform="scale\(([\d.]+) ([\d.]+)\) rotate')
svgscale_regex = re.compile(r'transform="scale\(([\d.]+) ([\d.]+)\) rotate')
def _gvfix(matchobj):
xs = float(matchobj.group(1))