haasn / libplacebo

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

SyntaxWarning in glsl_preproc/macros.py #274

Open sfan5 opened 3 months ago

sfan5 commented 3 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 6 days 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