##// END OF EJS Templates
check-code: single check for Python keywords used as a function...
Thomas Arendsen Hein -
r13076:a861c715 default
parent child Browse files
Show More
@@ -119,11 +119,8 b' pypats = ['
119 (r'^\s*(if|while|def|class|except|try)\s[^[]*:\s*[^\]#\s]+',
119 (r'^\s*(if|while|def|class|except|try)\s[^[]*:\s*[^\]#\s]+',
120 "linebreak after :"),
120 "linebreak after :"),
121 (r'class\s[^(]:', "old-style class, use class foo(object)"),
121 (r'class\s[^(]:', "old-style class, use class foo(object)"),
122 (r'^\s+del\(', "del isn't a function"),
122 (r'\b(%s)\(' % '|'.join(keyword.kwlist),
123 (r'\band\(', "and isn't a function"),
123 "Python keyword is not a function"),
124 (r'\bor\(', "or isn't a function"),
125 (r'\bnot\(', "not isn't a function"),
126 (r'^\s+except\(', "except isn't a function"),
127 (r',]', "unneeded trailing ',' in list"),
124 (r',]', "unneeded trailing ',' in list"),
128 # (r'class\s[A-Z][^\(]*\((?!Exception)',
125 # (r'class\s[A-Z][^\(]*\((?!Exception)',
129 # "don't capitalize non-exception classes"),
126 # "don't capitalize non-exception classes"),
General Comments 0
You need to be logged in to leave comments. Login now