[meld] ui.gtkcompat: Fix regex escaping



commit 91e7149b8f472e945f7be18a28655bfe1ebb14dd
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Jan 12 06:42:37 2019 +1000

    ui.gtkcompat: Fix regex escaping
    
    Best I can tell this had no impact on our selector parsing, but at least
    flake8 is happier now.

 meld/ui/gtkcompat.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meld/ui/gtkcompat.py b/meld/ui/gtkcompat.py
index ae0df5d6..d20b146c 100644
--- a/meld/ui/gtkcompat.py
+++ b/meld/ui/gtkcompat.py
@@ -45,7 +45,7 @@ def append_element(path, selector):
         ('drop(active)',  Gtk.StateFlags.DROP_ACTIVE)
     ]
 
-    toks = [t for t in re.split('([#\.:])', selector) if t]
+    toks = [t for t in re.split(r'([#\.:])', selector) if t]
     elements = [toks[i] + toks[i + 1] for i in range(1, len(toks), 2)]
 
     name = toks[0]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]