comparison contrib/check-code.py @ 25198:db77ff0b63da

check-code: drop the 'format' built-in I'm not clear what it is doing, but one who knows what it is about can now make use of it.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 18 May 2015 16:11:44 -0500
parents 6faa7d986a8b
children 3613819fb05f
comparison
equal deleted inserted replaced
25197:6faa7d986a8b 25198:db77ff0b63da
237 # (r'class\s[A-Z][^\(]*\((?!Exception)', 237 # (r'class\s[A-Z][^\(]*\((?!Exception)',
238 # "don't capitalize non-exception classes"), 238 # "don't capitalize non-exception classes"),
239 # (r'in range\(', "use xrange"), 239 # (r'in range\(', "use xrange"),
240 # (r'^\s*print\s+', "avoid using print in core and extensions"), 240 # (r'^\s*print\s+', "avoid using print in core and extensions"),
241 (r'[\x80-\xff]', "non-ASCII character literal"), 241 (r'[\x80-\xff]', "non-ASCII character literal"),
242 (r'(?<!def)\s+(format)\(',
243 "format not available in Python 2.4", 'no-py24'),
244 (r'if\s.*\selse', "if ... else form not available in Python 2.4"), 242 (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
245 (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist), 243 (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
246 "gratuitous whitespace after Python keyword"), 244 "gratuitous whitespace after Python keyword"),
247 (r'([\(\[][ \t]\S)|(\S[ \t][\)\]])', "gratuitous whitespace in () or []"), 245 (r'([\(\[][ \t]\S)|(\S[ \t][\)\]])', "gratuitous whitespace in () or []"),
248 # (r'\s\s=', "gratuitous whitespace before ="), 246 # (r'\s\s=', "gratuitous whitespace before ="),