robotools / fontParts

The replacement for RoboFab
MIT License
135 stars 44 forks source link

fontparts: Python SyntaxWarning #753

Open hosiet opened 1 week ago

hosiet commented 1 week ago

Forwarding downstream bug report at https://bugs.debian.org/1085580 :

Hi Maintainer

The SyntaxWarning below were emitted when this package was tested:

[1] https://piuparts.debian.org/sid/source/f/fontparts.html

Setting up python3-fontparts (0.12.2-1) ... /usr/lib/python3/dist-packages/fontParts/base/kerning.py:122: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:224: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:248: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:261: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:270: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:312: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:333: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:353: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:382: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:404: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/kerning.py:431: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/normalizers.py:625: SyntaxWarning: invalid escape sequence '\s' """ /usr/lib/python3/dist-packages/fontParts/base/normalizers.py:1068: SyntaxWarning: invalid escape sequence '\s' """

benkiel commented 1 week ago

@hosiet those are escapes for the doc text, think that they are correct, do you have a suggestion?

hosiet commented 1 week ago

@benkiel Just prepend the docstring with r would be enough. Otherwise escape the backslash with backslash again is another choice.