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

fix Python3.12 reg ex warnings #117

Merged
merged 1 commit into from
Dec 11, 2024
Merged

fix Python3.12 reg ex warnings #117

merged 1 commit into from
Dec 11, 2024

Conversation

mkannwischer
Copy link
Collaborator

I'm getting the following warnings with Python3.12:

/home/mjk/git/slothy/slothy/helper.py:778: SyntaxWarning: invalid escape sequence '\('
  l = re.sub(f"\\\\{arg}\\\\\(\)", val, l)
/home/mjk/git/slothy/slothy/helper.py:819: SyntaxWarning: invalid escape sequence '\s'
  macro_regexp_txt += '(,|\s)'.join(arg_regexps)

This commit fixes the escaping.

I'm getting the following warnings with Python3.12:
/home/mjk/git/slothy/slothy/helper.py:778: SyntaxWarning: invalid escape sequence '\('
  l = re.sub(f"\\\\{arg}\\\\\(\)", val, l)
/home/mjk/git/slothy/slothy/helper.py:819: SyntaxWarning: invalid escape sequence '\s'
  macro_regexp_txt += '(,|\s)'.join(arg_regexps)

This commit fixes the escaping.
@mkannwischer mkannwischer marked this pull request as ready for review December 10, 2024 07:49
@mkannwischer mkannwischer merged commit 4c7b177 into main Dec 11, 2024
13 checks passed
@mkannwischer mkannwischer deleted the python312-warnings branch December 11, 2024 08:13
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

Successfully merging this pull request may close these issues.

1 participant