[PATCH] check-code: Added check for reduce usage

Renato Cunha renatoc at gmail.com
Tue Jul 13 08:48:02 CDT 2010


# HG changeset patch
# User Renato Cunha <renatoc at gmail.com>
# Date 1279028424 10800
# Branch stable
# Node ID 1cf31599f31f83b321a5088cd721b90e5f56d3f5
# Parent  d4646405d68f679c58992a687183003f61986c4e
check-code: Added check for reduce usage.

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -74,6 +74,7 @@
      "tuple parameter unpacking not available in Python 3+"),
     (r'lambda\s*\(.*,.*\)',
      "tuple parameter unpacking not available in Python 3+"),
+    (r'\breduce\s*\(.*', "reduce is 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