From 78264e09e5045e976cc6d18c2e3aa486c694f552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Fri, 15 Nov 2024 16:38:46 +0100 Subject: [PATCH] visualizer: Fix 'SyntaxWarning: invalid escape sequence' --- src/visualizer/visualizer/ipython_view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/visualizer/visualizer/ipython_view.py b/src/visualizer/visualizer/ipython_view.py index a3267c052..5f28d72aa 100644 --- a/src/visualizer/visualizer/ipython_view.py +++ b/src/visualizer/visualizer/ipython_view.py @@ -138,7 +138,7 @@ class IterableIPShell: sys.excepthook = excepthook self.iter_more = 0 self.history_level = 0 - self.complete_sep = re.compile("[\s\{\}\[\]\(\)]") + self.complete_sep = re.compile(r"[\s\{\}\[\]\(\)]") self.updateNamespace({"exit": lambda: None}) self.updateNamespace({"quit": lambda: None}) # Workaround for updating namespace with sys.modules @@ -433,7 +433,7 @@ class ConsoleView(Gtk.TextView): ) self.text_buffer.create_tag("0") self.text_buffer.create_tag("notouch", editable=False) - self.color_pat = re.compile("\x01?\x1b\[(.*?)m\x02?") + self.color_pat = re.compile(r"\x01?\x1b\[(.*?)m\x02?") self.line_start = self.text_buffer.create_mark( "line_start", self.text_buffer.get_end_iter(), True )