comparison contrib/check-code.py @ 25148:3b5cd6f13dcc

check-code: un-ban any() now that we're on 2.6
author Augie Fackler <augie@google.com>
date Sat, 16 May 2015 14:31:03 -0400
parents 24140873ca4c
children d28cc89d92f0
comparison
equal deleted inserted replaced
25147:fb7b9a765bb9 25148:3b5cd6f13dcc
241 # "don't capitalize non-exception classes"), 241 # "don't capitalize non-exception classes"),
242 # (r'in range\(', "use xrange"), 242 # (r'in range\(', "use xrange"),
243 # (r'^\s*print\s+', "avoid using print in core and extensions"), 243 # (r'^\s*print\s+', "avoid using print in core and extensions"),
244 (r'[\x80-\xff]', "non-ASCII character literal"), 244 (r'[\x80-\xff]', "non-ASCII character literal"),
245 (r'("\')\.format\(', "str.format() not available in Python 2.4"), 245 (r'("\')\.format\(', "str.format() not available in Python 2.4"),
246 (r'(?<!def)\s+(any|all|format)\(', 246 (r'(?<!def)\s+(all|format)\(',
247 "any/all/format not available in Python 2.4", 'no-py24'), 247 "all/format not available in Python 2.4", 'no-py24'),
248 (r'if\s.*\selse', "if ... else form not available in Python 2.4"), 248 (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
249 (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist), 249 (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
250 "gratuitous whitespace after Python keyword"), 250 "gratuitous whitespace after Python keyword"),
251 (r'([\(\[][ \t]\S)|(\S[ \t][\)\]])', "gratuitous whitespace in () or []"), 251 (r'([\(\[][ \t]\S)|(\S[ \t][\)\]])', "gratuitous whitespace in () or []"),
252 # (r'\s\s=', "gratuitous whitespace before ="), 252 # (r'\s\s=', "gratuitous whitespace before ="),