From d75e75190d6aafbd7444b4da8fd89efafa44d4a0 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 29 Oct 2024 14:03:46 -0700 Subject: [PATCH] style: Fix regex string formatting in test commands --- tests/basic/test_commands.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index 50215f0ff..ec1dcbefb 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -749,7 +749,9 @@ class TestCommands(TestCase): self.assertTrue(Path(session_file).exists()) with open(session_file, encoding=io.encoding) as f: commands_text = f.read() - commands_text = re.sub(r'/add +', '/add ', commands_text) # Normalize add command spaces + commands_text = re.sub( + r"/add +", "/add ", commands_text + ) # Normalize add command spaces self.assertIn("/add file1.txt", commands_text) # Split commands and check each one for line in commands_text.splitlines(): @@ -823,7 +825,9 @@ class TestCommands(TestCase): self.assertTrue(Path(session_file).exists()) with open(session_file, encoding=io.encoding) as f: commands_text = f.read() - commands_text = re.sub(r'/add +', '/add ', commands_text) # Normalize add command spaces + commands_text = re.sub( + r"/add +", "/add ", commands_text + ) # Normalize add command spaces self.assertIn("/add internal1.txt", commands_text) # Split commands and check each one for line in commands_text.splitlines():