contrib/check-code.py
changeset 22448 8afaf7cef35a
parent 22175 2965804483e3
child 23134 22e76e370611
equal deleted inserted replaced
22447:2642ce9be6ef 22448:8afaf7cef35a
   297     (r'^\s*except\s*:', "naked except clause", r'#.*re-raises'),
   297     (r'^\s*except\s*:', "naked except clause", r'#.*re-raises'),
   298     (r':\n(    )*( ){1,3}[^ ]', "must indent 4 spaces"),
   298     (r':\n(    )*( ){1,3}[^ ]', "must indent 4 spaces"),
   299     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
   299     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
   300      "missing _() in ui message (use () to hide false-positives)"),
   300      "missing _() in ui message (use () to hide false-positives)"),
   301     (r'release\(.*wlock, .*lock\)', "wrong lock release order"),
   301     (r'release\(.*wlock, .*lock\)', "wrong lock release order"),
       
   302     (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"),
   302   ],
   303   ],
   303   # warnings
   304   # warnings
   304   [
   305   [
   305     (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"),
   306     (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"),
   306   ]
   307   ]