[PATCH 5 of 5] check-code: Added a check for tuple parameter unpacking (unsupported in py3k)
Renato Cunha
renatoc at gmail.com
Fri Jul 2 23:26:57 CDT 2010
# HG changeset patch
# User Renato Cunha <renatoc at gmail.com>
# Date 1278105370 10800
# Node ID 8cd1030743f0593cd68ae72c9b76efd65055716d
# Parent 221894022b4274527770c6fad841fc07deb43b54
check-code: Added a check for tuple parameter unpacking (unsupported in py3k)
diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -70,6 +70,10 @@
]
pypats = [
+ (r'^\s*def\s*\w+\s*\(.*,\s*\(',
+ "tuple parameter unpacking not available in Python 3+"),
+ (r'lambda\s*\(.*,.*\)',
+ "tuple parameter unpacking not available in Python 3+"),
(r'^\s*\t', "don't use tabs"),
(r'\S;\s*\n', "semicolon"),
(r'\w,\w', "missing whitespace after ,"),
More information about the Mercurial-devel
mailing list