##// END OF EJS Templates
check-code: allow old style class with special comments...
Jun Wu -
r28219:97fe8880 default
parent child Browse files
Show More
@@ -245,9 +245,11 pypats = [
245 245 "don't use camelcase in identifiers"),
246 246 (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+',
247 247 "linebreak after :"),
248 (r'class\s[^( \n]+:', "old-style class, use class foo(object)"),
248 (r'class\s[^( \n]+:', "old-style class, use class foo(object)",
249 r'#.*old-style'),
249 250 (r'class\s[^( \n]+\(\):',
250 "class foo() creates old style object, use class foo(object)"),
251 "class foo() creates old style object, use class foo(object)",
252 r'#.*old-style'),
251 253 (r'\b(%s)\(' % '|'.join(k for k in keyword.kwlist
252 254 if k not in ('print', 'exec')),
253 255 "Python keyword is not a function"),
General Comments 0
You need to be logged in to leave comments. Login now