changeset 32182:ac641a41f98d

check-code: rewrite py3 exclusion pattern with negative lookahead I want to add more patterns, but negative lookbehind requires patterns of the same length so not useful.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 01 May 2017 17:10:22 +0900
parents b98ee1a808bd
children 41d79475d440
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Wed May 03 11:16:55 2017 +0900
+++ b/contrib/check-code.py	Mon May 01 17:10:22 2017 +0900
@@ -492,7 +492,7 @@
 checks = [
     ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats),
     ('python', r'.*hgext.*\.py$', '', [], pyextnfpats),
-    ('python 3', r'.*(hgext|mercurial).*(?<!pycompat)\.py', '',
+    ('python 3', r'.*(hgext|mercurial)/(?!pycompat).*\.py', '',
             pyfilters, py3pats),
     ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats),
     ('c', r'.*\.[ch]$', '', cfilters, cpats),