contrib/check-code.py
changeset 22175 2965804483e3
parent 22101 6fa40bd78bc8
child 22448 8afaf7cef35a
equal deleted inserted replaced
22174:0cc2db64c335 22175:2965804483e3
   214     (r'[^_]_\([ \t\n]*(?:"[^"]+"[ \t\n+]*)+%', "don't use % inside _()"),
   214     (r'[^_]_\([ \t\n]*(?:"[^"]+"[ \t\n+]*)+%', "don't use % inside _()"),
   215     (r"[^_]_\([ \t\n]*(?:'[^']+'[ \t\n+]*)+%", "don't use % inside _()"),
   215     (r"[^_]_\([ \t\n]*(?:'[^']+'[ \t\n+]*)+%", "don't use % inside _()"),
   216     (r'(\w|\)),\w', "missing whitespace after ,"),
   216     (r'(\w|\)),\w', "missing whitespace after ,"),
   217     (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"),
   217     (r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"),
   218     (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"),
   218     (r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"),
   219     (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n'
   219     (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)(\1except.*?:\n'
   220      r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Python 2.4'),
   220      r'((?:\n|\1\s.*\n)+?))+\1finally:',
       
   221      'no try/except/finally in Python 2.4'),
   221     (r'(?<!def)(\s+|^|\()next\(.+\)',
   222     (r'(?<!def)(\s+|^|\()next\(.+\)',
   222      'no next(foo) in Python 2.4 and 2.5, use foo.next() instead'),
   223      'no next(foo) in Python 2.4 and 2.5, use foo.next() instead'),
   223     (r'(\s+)try:\n((?:\n|\1\s.*\n)*?)\1\s*yield\b.*?'
   224     (r'(\s+)try:\n((?:\n|\1\s.*\n)*?)\1\s*yield\b.*?'
   224      r'((?:\n|\1\s.*\n)+?)\1finally:',
   225      r'((?:\n|\1\s.*\n)+?)\1finally:',
   225      'no yield inside try/finally in Python 2.4'),
   226      'no yield inside try/finally in Python 2.4'),