changeset 30883:fe8ded72e17c

check-code: permit functools.reduce
author Yedidya Feldblum <yfeldblum@fb.com>
date Sat, 21 Jan 2017 14:43:13 -0800
parents 74cfc4357c64
children a68510b69f41
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Sat Feb 04 08:47:46 2017 -0800
+++ b/contrib/check-code.py	Sat Jan 21 14:43:13 2017 -0800
@@ -237,7 +237,7 @@
     (r'lambda\s*\(.*,.*\)',
      "tuple parameter unpacking not available in Python 3+"),
     (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"),
-    (r'\breduce\s*\(.*', "reduce is not available in Python 3+"),
+    (r'(?<!\.)\breduce\s*\(.*', "reduce is not available in Python 3+"),
     (r'\bdict\(.*=', 'dict() is different in Py2 and 3 and is slower than {}',
      'dict-from-generator'),
     (r'\.has_key\b', "dict.has_key is not available in Python 3+"),