comparison contrib/check-code.py @ 25139:6d3079e9b53f

check-code: remove the check for os.path.relpath This is available in Python2.6 the new default supported release.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sun, 17 May 2015 17:36:26 -0700
parents 68633ff2b608
children 317333e0793c
comparison
equal deleted inserted replaced
25138:0d6b64fbb5ba 25139:6d3079e9b53f
244 # (r'in range\(', "use xrange"), 244 # (r'in range\(', "use xrange"),
245 # (r'^\s*print\s+', "avoid using print in core and extensions"), 245 # (r'^\s*print\s+', "avoid using print in core and extensions"),
246 (r'[\x80-\xff]', "non-ASCII character literal"), 246 (r'[\x80-\xff]', "non-ASCII character literal"),
247 (r'("\')\.format\(', "str.format() not available in Python 2.4"), 247 (r'("\')\.format\(', "str.format() not available in Python 2.4"),
248 (r'\.isdisjoint\(', "set.isdisjoint not available in Python 2.4"), 248 (r'\.isdisjoint\(', "set.isdisjoint not available in Python 2.4"),
249 (r'^\s*os\.path\.relpath', "relpath not available in Python 2.4"),
250 (r'(?<!def)\s+(any|all|format)\(', 249 (r'(?<!def)\s+(any|all|format)\(',
251 "any/all/format not available in Python 2.4", 'no-py24'), 250 "any/all/format not available in Python 2.4", 'no-py24'),
252 (r'if\s.*\selse', "if ... else form not available in Python 2.4"), 251 (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
253 (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist), 252 (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
254 "gratuitous whitespace after Python keyword"), 253 "gratuitous whitespace after Python keyword"),