plug-ins: fix pyconsole syntax for Python 3.12

With Python 3.12, every run of the Python console shows
a SyntaxWarning about invalid escape sequence unless the
string is marked as a raw string.
This commit is contained in:
Anders Jonsson 2024-07-13 18:12:47 +02:00 committed by Alx Sa
parent 2d0e741b1b
commit 221f8ab14d
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ class _ReadLine(object):
self.run_on_raw_input = None
self.tab_pressed = 0
self.history = _ReadLine.History()
self.nonword_re = re.compile("[^\w\._]")
self.nonword_re = re.compile(r"[^\w\._]")
def freeze_undo(self):
try: self.begin_not_undoable_action()