From ac7fbb4f860212a9beb10fe7d4001b267e8ce91e Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Tue, 16 Sep 2025 07:59:01 +0800 Subject: [PATCH] [toranj] fix syntax warning in `cli.py` (#11931) This commit fixes the syntax error by declaring the regex pattern as raw string. ``` SyntaxWarning: invalid escape sequence '\d' ``` --- tests/toranj/cli/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/toranj/cli/cli.py b/tests/toranj/cli/cli.py index ec70f507d..6fb6cffc0 100644 --- a/tests/toranj/cli/cli.py +++ b/tests/toranj/cli/cli.py @@ -162,7 +162,7 @@ class Node(object): _log(f'$ Node{self._index}.cli(\'{cmd}\')', new_line=False) self._cli_process.send(cmd + '\n') - index = self._cli_process.expect(['(.*)Done\r\n', '.*Error (\d+):(.*)\r\n']) + index = self._cli_process.expect([r'(.*)Done\r\n', r'.*Error (\d+):(.*)\r\n']) if index == 0: result = [