Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 11602:ba2520dd1e29
check-code: catch dict.has_key
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Fri, 16 Jul 2010 14:48:52 +0200 |
parents | 4d9b4725acac |
children | c5d40818b270 |
comparison
equal
deleted
inserted
replaced
11601:4d9b4725acac | 11602:ba2520dd1e29 |
---|---|
73 (r'^\s*def\s*\w+\s*\(.*,\s*\(', | 73 (r'^\s*def\s*\w+\s*\(.*,\s*\(', |
74 "tuple parameter unpacking not available in Python 3+"), | 74 "tuple parameter unpacking not available in Python 3+"), |
75 (r'lambda\s*\(.*,.*\)', | 75 (r'lambda\s*\(.*,.*\)', |
76 "tuple parameter unpacking not available in Python 3+"), | 76 "tuple parameter unpacking not available in Python 3+"), |
77 (r'\breduce\s*\(.*', "reduce is not available in Python 3+"), | 77 (r'\breduce\s*\(.*', "reduce is not available in Python 3+"), |
78 (r'\.has_key\b', "dict.has_key is not available in Python 3+"), | |
78 (r'^\s*\t', "don't use tabs"), | 79 (r'^\s*\t', "don't use tabs"), |
79 (r'\S;\s*\n', "semicolon"), | 80 (r'\S;\s*\n', "semicolon"), |
80 (r'\w,\w', "missing whitespace after ,"), | 81 (r'\w,\w', "missing whitespace after ,"), |
81 (r'\w[+/*\-<>]\w', "missing whitespace in expression"), | 82 (r'\w[+/*\-<>]\w', "missing whitespace in expression"), |
82 (r'^\s+\w+=\w+[^,)]$', "missing whitespace in assignment"), | 83 (r'^\s+\w+=\w+[^,)]$', "missing whitespace in assignment"), |