comparison contrib/check-code.py @ 30883:fe8ded72e17c

check-code: permit functools.reduce
author Yedidya Feldblum <yfeldblum@fb.com>
date Sat, 21 Jan 2017 14:43:13 -0800
parents 6a70cf94d1b5
children 455677a7667f
comparison
equal deleted inserted replaced
30882:74cfc4357c64 30883:fe8ded72e17c
235 (r'^\s*def\s*\w+\s*\(.*,\s*\(', 235 (r'^\s*def\s*\w+\s*\(.*,\s*\(',
236 "tuple parameter unpacking not available in Python 3+"), 236 "tuple parameter unpacking not available in Python 3+"),
237 (r'lambda\s*\(.*,.*\)', 237 (r'lambda\s*\(.*,.*\)',
238 "tuple parameter unpacking not available in Python 3+"), 238 "tuple parameter unpacking not available in Python 3+"),
239 (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"), 239 (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"),
240 (r'\breduce\s*\(.*', "reduce is not available in Python 3+"), 240 (r'(?<!\.)\breduce\s*\(.*', "reduce is not available in Python 3+"),
241 (r'\bdict\(.*=', 'dict() is different in Py2 and 3 and is slower than {}', 241 (r'\bdict\(.*=', 'dict() is different in Py2 and 3 and is slower than {}',
242 'dict-from-generator'), 242 'dict-from-generator'),
243 (r'\.has_key\b', "dict.has_key is not available in Python 3+"), 243 (r'\.has_key\b', "dict.has_key is not available in Python 3+"),
244 (r'\s<>\s', '<> operator is not available in Python 3+, use !='), 244 (r'\s<>\s', '<> operator is not available in Python 3+, use !='),
245 (r'^\s*\t', "don't use tabs"), 245 (r'^\s*\t', "don't use tabs"),