Mercurial > hg
changeset 21791:fb16f6da5b3b
check-code: drop ban on callable() which was restored in Python 3.2
A followup will restore use of callable() in place of the awkward
hasattr() construction we were using to be one step closer to Python
3.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 23 Jun 2014 09:22:53 -0400 |
parents | 3fbef7ac26f0 |
children | e15c991fe2ec |
files | contrib/check-code.py |
diffstat | 1 files changed, 0 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Sat Jun 21 15:56:49 2014 +1000 +++ b/contrib/check-code.py Mon Jun 23 09:22:53 2014 -0400 @@ -247,8 +247,6 @@ (r'^\s*os\.path\.relpath', "relpath not available in Python 2.4"), (r'(?<!def)\s+(any|all|format)\(', "any/all/format not available in Python 2.4", 'no-py24'), - (r'(?<!def)\s+(callable)\(', - "callable not available in Python 3, use getattr(f, '__call__', None)"), (r'if\s.*\selse', "if ... else form not available in Python 2.4"), (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist), "gratuitous whitespace after Python keyword"),