Skip to content

Fix syntax warning about an invalid escape sequence#84

Merged
Enchufa2 merged 1 commit intocran4linux:masterfrom
pekkarr:regex-escape
Aug 7, 2024
Merged

Fix syntax warning about an invalid escape sequence#84
Enchufa2 merged 1 commit intocran4linux:masterfrom
pekkarr:regex-escape

Conversation

@pekkarr
Copy link
Contributor

@pekkarr pekkarr commented Aug 7, 2024

With Python 3.12, invalid escape sequences like \. in string literals cause a syntax warning:

service/backend/_utils.py:46: SyntaxWarning: invalid escape sequence '\.'
  version = re.sub("\.r[0-9]+$", "", version)

Fix this by using the raw string notation instead.

With Python 3.12, invalid escape sequences like `\.` in string literals
cause a syntax warning:

```
service/backend/_utils.py:46: SyntaxWarning: invalid escape sequence '\.'
  version = re.sub("\.r[0-9]+$", "", version)
```

Fix this by using the raw string notation instead.
@Enchufa2 Enchufa2 merged commit 9c4111d into cran4linux:master Aug 7, 2024
@Enchufa2
Copy link
Member

Enchufa2 commented Aug 7, 2024

Thanks!

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.

2 participants