diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -245,9 +245,11 @@ pypats = [ "don't use camelcase in identifiers"), (r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+', "linebreak after :"), - (r'class\s[^( \n]+:', "old-style class, use class foo(object)"), + (r'class\s[^( \n]+:', "old-style class, use class foo(object)", + r'#.*old-style'), (r'class\s[^( \n]+\(\):', - "class foo() creates old style object, use class foo(object)"), + "class foo() creates old style object, use class foo(object)", + r'#.*old-style'), (r'\b(%s)\(' % '|'.join(k for k in keyword.kwlist if k not in ('print', 'exec')), "Python keyword is not a function"),