120 (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"), |
120 (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"), |
121 (r'\breduce\s*\(.*', "reduce is not available in Python 3+"), |
121 (r'\breduce\s*\(.*', "reduce is not available in Python 3+"), |
122 (r'\.has_key\b', "dict.has_key is not available in Python 3+"), |
122 (r'\.has_key\b', "dict.has_key is not available in Python 3+"), |
123 (r'^\s*\t', "don't use tabs"), |
123 (r'^\s*\t', "don't use tabs"), |
124 (r'\S;\s*\n', "semicolon"), |
124 (r'\S;\s*\n', "semicolon"), |
|
125 (r'[^_]_\("[^"]+"\s*%', "don't use % inside _()"), |
|
126 (r"[^_]_\('[^']+'\s*%", "don't use % inside _()"), |
125 (r'\w,\w', "missing whitespace after ,"), |
127 (r'\w,\w', "missing whitespace after ,"), |
126 (r'\w[+/*\-<>]\w', "missing whitespace in expression"), |
128 (r'\w[+/*\-<>]\w', "missing whitespace in expression"), |
127 (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"), |
129 (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"), |
128 (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n' |
130 (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n' |
129 r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'), |
131 r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'), |