From ebb6820a27387dd23540913e4be335a424eb8c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Sat, 18 Apr 2026 11:16:13 +0200 Subject: [PATCH] removal of warnings on regex. --- src/testium/libs/console_ssh.py | 6 +++--- src/testium/main_win/text_log_highlighter.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/testium/libs/console_ssh.py b/src/testium/libs/console_ssh.py index d35efe1..fb8c800 100755 --- a/src/testium/libs/console_ssh.py +++ b/src/testium/libs/console_ssh.py @@ -125,12 +125,12 @@ class pxssh(spawn): # prompt command different than the regex. # used to match the command-line prompt - self.UNIQUE_PROMPT = "\[PEXPECT\][\$\#] " + self.UNIQUE_PROMPT = r"\[PEXPECT\][\$\#] " self.PROMPT = self.UNIQUE_PROMPT # used to set shell command-line prompt to UNIQUE_PROMPT. - self.PROMPT_SET_SH = "PS1='[PEXPECT]\$ '" - self.PROMPT_SET_CSH = "set prompt='[PEXPECT]\$ '" + self.PROMPT_SET_SH = r"PS1='[PEXPECT]\$ '" + self.PROMPT_SET_CSH = r"set prompt='[PEXPECT]\$ '" self.SSH_OPTS = "-o'RSAAuthentication=no'" + " -o 'PubkeyAuthentication=no'" # Disabling host key checking, makes you vulnerable to MITM attacks. # + " -o 'StrictHostKeyChecking=no'" diff --git a/src/testium/main_win/text_log_highlighter.py b/src/testium/main_win/text_log_highlighter.py index 1ef8026..71e3ffa 100644 --- a/src/testium/main_win/text_log_highlighter.py +++ b/src/testium/main_win/text_log_highlighter.py @@ -79,16 +79,16 @@ class TextLogHighlighter (QSyntaxHighlighter): # Comparison '==', '!=', '<', '<=', '>', '>=', # Arithmetic - '\+', '-', '\*', '/', '//', '\%', '\*\*', + r'\+', '-', r'\*', '/', '//', r'\%', r'\*\*', # In-place - '\+=', '-=', '\*=', '/=', '\%=', + r'\+=', '-=', r'\*=', '/=', r'\%=', # Bitwise - '\^', '\|', '\&', '\~', '>>', '<<', + r'\^', r'\|', r'\&', r'\~', '>>', '<<', ] # Python braces braces = [ - '\{', '\}', '\(', '\)', '\[', '\]', + r'\{', r'\}', r'\(', r'\)', r'\[', r'\]', ] def __init__(self, document):