haasn / libplacebo

Official mirror of libplacebo
http://libplacebo.org/
GNU Lesser General Public License v2.1
568 stars 72 forks source link

SyntaxWarning in glsl_preproc/macros.py #274

Open sfan5 opened 5 months ago

sfan5 commented 5 months ago
/home/stefan/aurbuild/libplacebo-git.git/src/libplacebo/tools/glsl_preproc/macros.py:87: SyntaxWarning: invalid escape sequence '\s'
  line = re.sub(f'^\s{{1,{leading_spaces}}}', '', line)

no bug because "\s" == "\\s"

ryandesign commented 2 months ago

This occurs only with Python 3.12 and later.

To fix this bug, use a raw string; see https://docs.python.org/3/library/re.html