removal of warnings on regex.

This commit is contained in:
2026-04-18 11:16:13 +02:00
parent 8648463136
commit ebb6820a27
2 changed files with 7 additions and 7 deletions

View File

@@ -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'"

View File

@@ -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):