Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxWarning in glsl_preproc/macros.py #274

Open
sfan5 opened this issue Jun 20, 2024 · 1 comment
Open

SyntaxWarning in glsl_preproc/macros.py #274

sfan5 opened this issue Jun 20, 2024 · 1 comment

Comments

@sfan5
Copy link
Contributor

sfan5 commented Jun 20, 2024

/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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants