Patchwork [3,of,5] check-code: compile filters when loading

login
register
mail settings
Submitter Simon Heimberg
Date June 8, 2013, 6:57 p.m.
Message ID <9ea9c7411f1540ee7d69.1370717821@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/1711/
State Accepted
Commit 7d77fa1cd5372dcc7a1e416c6dd7be6304f1a72d
Headers show

Comments

Simon Heimberg - June 8, 2013, 6:57 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1370715614 -7200
# Node ID 9ea9c7411f1540ee7d6960087774388d28438b39
# Parent  ddedc8623eb8287b7d5bc50a6c24404a6ec39c8a
check-code: compile filters when loading

Patch

diff -r ddedc8623eb8 -r 9ea9c7411f15 contrib/check-code.py
--- a/contrib/check-code.py	Sam Jun 08 20:20:14 2013 +0200
+++ b/contrib/check-code.py	Sam Jun 08 20:20:14 2013 +0200
@@ -331,6 +331,9 @@ 
 
                 #print po, '=>', p
                 pats[i] = (re.compile(p, re.MULTILINE),) + pseq[1:]
+        filters = c[2]
+        for i, flt in enumerate(filters):
+            filters[i] = re.compile(flt[0]), flt[1]
 _preparepats()
 
 class norepeatlogger(object):