Mercurial > public > mercurial-scm > hg-stable
comparison contrib/check-code.py @ 25141:3ea8d6b5e665
check-code: drop the 'isdisjoint' ban
'isdisjoint' is available in Python 2.6. The new lowest supported version.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sun, 17 May 2015 17:45:47 -0700 |
parents | 317333e0793c |
children | 24140873ca4c |
comparison
equal
deleted
inserted
replaced
25140:317333e0793c | 25141:3ea8d6b5e665 |
---|---|
243 # "don't capitalize non-exception classes"), | 243 # "don't capitalize non-exception classes"), |
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"), | |
249 (r'(?<!def)\s+(any|all|format)\(', | 248 (r'(?<!def)\s+(any|all|format)\(', |
250 "any/all/format not available in Python 2.4", 'no-py24'), | 249 "any/all/format not available in Python 2.4", 'no-py24'), |
251 (r'if\s.*\selse', "if ... else form not available in Python 2.4"), | 250 (r'if\s.*\selse', "if ... else form not available in Python 2.4"), |
252 (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist), | 251 (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist), |
253 "gratuitous whitespace after Python keyword"), | 252 "gratuitous whitespace after Python keyword"), |