Skip to content

Conversation

@Maraxi
Copy link
Contributor

@Maraxi Maraxi commented Mar 13, 2025

Fixed the string in saspy/sasproccommons.py:398 to no longer contain an invalid escape sequence.
See some documentation in https://docs.astral.sh/ruff/rules/invalid-escape-sequence/.

As far as I can tell this only caused deprecation warnings since python3.6 and no actual errors.

Signed-off-by: Stefan Eysoldt stefan.eysoldt@deutsche-boerse.de

Fixed the string in saspy/sasproccommons.py:398 to no longer contain an invalid escape sequence.
https://docs.astral.sh/ruff/rules/invalid-escape-sequence/

Signed-off-by: Maraxi <36485759+Maraxi@users.noreply.github.com>
@tomweber-sas
Copy link
Collaborator

tomweber-sas commented Mar 13, 2025

Hey, thanks for this. I appreciate the contribution. I see the message on windows (where these are often a problem when coding a backslash in any string). Linux doesn't care. I was able to easily see the warning on Win and see your change fixes it, as coding raw string literals are the easy solution for these on win.

win:

>>> print('/\:;.%')
<stdin>:1: SyntaxWarning: invalid escape sequence '\:'
/\:;.%
>>> print(r'/\:;.%')
/\:;.%
>>>

linux:

>>> '/\:;.%'
'/\\:;.%'
>>> print('/\:;.%')
/\:;.%
>>> print(r'/\:;.%')
/\:;.%
>>>

@tomweber-sas tomweber-sas merged commit 89b5965 into sassoftware:main Mar 13, 2025
3 checks passed
@Maraxi Maraxi deleted the patch-1 branch March 13, 2025 16:30
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