Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 13161:11eb53464e68
check-code: catch os.path.relpath
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 16 Dec 2010 14:50:37 -0600 |
parents | 07d08c130892 |
children | 4b07578967e6 |
comparison
equal
deleted
inserted
replaced
13160:07d08c130892 | 13161:11eb53464e68 |
---|---|
128 # (r'^\s*print\s+', "avoid using print in core and extensions"), | 128 # (r'^\s*print\s+', "avoid using print in core and extensions"), |
129 (r'[\x80-\xff]', "non-ASCII character literal"), | 129 (r'[\x80-\xff]', "non-ASCII character literal"), |
130 (r'("\')\.format\(', "str.format() not available in Python 2.4"), | 130 (r'("\')\.format\(', "str.format() not available in Python 2.4"), |
131 (r'^\s*with\s+', "with not available in Python 2.4"), | 131 (r'^\s*with\s+', "with not available in Python 2.4"), |
132 (r'^\s*except.* as .*:', "except as not available in Python 2.4"), | 132 (r'^\s*except.* as .*:', "except as not available in Python 2.4"), |
133 (r'^\s*os\.path\.relpath', "relpath not available in Python 2.4"), | |
133 (r'(?<!def)\s+(any|all|format)\(', | 134 (r'(?<!def)\s+(any|all|format)\(', |
134 "any/all/format not available in Python 2.4"), | 135 "any/all/format not available in Python 2.4"), |
135 (r'(?<!def)\s+(callable)\(', | 136 (r'(?<!def)\s+(callable)\(', |
136 "callable not available in Python 3, use hasattr(f, '__call__')"), | 137 "callable not available in Python 3, use hasattr(f, '__call__')"), |
137 (r'if\s.*\selse', "if ... else form not available in Python 2.4"), | 138 (r'if\s.*\selse', "if ... else form not available in Python 2.4"), |