comparison contrib/check-code.py @ 11568:d5d4e6a30613

check-code: check for tuple parameter unpacking (missing in py3k)
author Renato Cunha <renatoc@gmail.com>
date Wed, 14 Jul 2010 23:15:00 -0300
parents eaa7666ad53f
children f8576644a222
comparison
equal deleted inserted replaced
11567:34cc8b84407f 11568:d5d4e6a30613
68 (r"( *)(#([^\n]*\S)?)", repcomment), 68 (r"( *)(#([^\n]*\S)?)", repcomment),
69 (r"<<(\S+)((.|\n)*?\n\1)", rephere), 69 (r"<<(\S+)((.|\n)*?\n\1)", rephere),
70 ] 70 ]
71 71
72 pypats = [ 72 pypats = [
73 (r'^\s*def\s*\w+\s*\(.*,\s*\(',
74 "tuple parameter unpacking not available in Python 3+"),
75 (r'lambda\s*\(.*,.*\)',
76 "tuple parameter unpacking not available in Python 3+"),
73 (r'^\s*\t', "don't use tabs"), 77 (r'^\s*\t', "don't use tabs"),
74 (r'\S;\s*\n', "semicolon"), 78 (r'\S;\s*\n', "semicolon"),
75 (r'\w,\w', "missing whitespace after ,"), 79 (r'\w,\w', "missing whitespace after ,"),
76 (r'\w[+/*\-<>]\w', "missing whitespace in expression"), 80 (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
77 (r'^\s+\w+=\w+[^,)]$', "missing whitespace in assignment"), 81 (r'^\s+\w+=\w+[^,)]$', "missing whitespace in assignment"),