Skip to content

Commit 89b5965

Browse files
authored
Fix deprecated warning for invalid escape sequence (#639)
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>
1 parent f4ccd65 commit 89b5965

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

saspy/sasproccommons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def _processNominals(self, kwargs, data):
395395
# what object type is target
396396
if isinstance(tgt, str):
397397
# if there is special character do nothing
398-
if len([word for word in tgt if any(letter in word for letter in '/\:;.%')]) != 0:
398+
if len([word for word in tgt if any(letter in word for letter in r'/\:;.%')]) != 0:
399399
kwargs['target'] = tgt
400400
else:
401401
# turn str into list and search for nominals
@@ -437,7 +437,7 @@ def _processNominals(self, kwargs, data):
437437
if isinstance(inputs, str):
438438
# if there is only one word or special character do nothing
439439
if len(inputs.split()) == 1 or len(
440-
[word for word in inputs if any(letter in word for letter in '-/\\:;.%')]) != 0:
440+
[word for word in inputs if any(letter in word for letter in r'-/\:;.%')]) != 0:
441441
kwargs['input'] = inputs
442442
else:
443443
# turn str into list and search for nominals

0 commit comments

Comments
 (0)