##// END OF EJS Templates
check-code: fix the error message about 'class foo():'...
Pierre-Yves David -
r25140:317333e0 default
parent child Browse files
Show More
@@ -234,7 +234,7 b' pypats = ['
234 "linebreak after :"),
234 "linebreak after :"),
235 (r'class\s[^( \n]+:', "old-style class, use class foo(object)"),
235 (r'class\s[^( \n]+:', "old-style class, use class foo(object)"),
236 (r'class\s[^( \n]+\(\):',
236 (r'class\s[^( \n]+\(\):',
237 "class foo() not available in Python 2.4, use class foo(object)"),
237 "class foo() creates old style object, use class foo(object)"),
238 (r'\b(%s)\(' % '|'.join(k for k in keyword.kwlist
238 (r'\b(%s)\(' % '|'.join(k for k in keyword.kwlist
239 if k not in ('print', 'exec')),
239 if k not in ('print', 'exec')),
240 "Python keyword is not a function"),
240 "Python keyword is not a function"),
@@ -115,7 +115,7 b''
115 old-style class, use class foo(object)
115 old-style class, use class foo(object)
116 ./classstyle.py:7:
116 ./classstyle.py:7:
117 > class empty():
117 > class empty():
118 class foo() not available in Python 2.4, use class foo(object)
118 class foo() creates old style object, use class foo(object)
119 [1]
119 [1]
120 $ cat > python3-compat.py << EOF
120 $ cat > python3-compat.py << EOF
121 > foo <> bar
121 > foo <> bar
General Comments 0
You need to be logged in to leave comments. Login now