289 (r'release\(.*wlock, .*lock\)', "wrong lock release order"), |
289 (r'release\(.*wlock, .*lock\)', "wrong lock release order"), |
290 (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"), |
290 (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"), |
291 (r'os\.path\.join\(.*, *(""|\'\')\)', |
291 (r'os\.path\.join\(.*, *(""|\'\')\)', |
292 "use pathutil.normasprefix(path) instead of os.path.join(path, '')"), |
292 "use pathutil.normasprefix(path) instead of os.path.join(path, '')"), |
293 (r'\s0[0-7]+\b', 'legacy octal syntax; use "0o" prefix instead of "0"'), |
293 (r'\s0[0-7]+\b', 'legacy octal syntax; use "0o" prefix instead of "0"'), |
|
294 # XXX only catch mutable arguments on the first line of the definition |
|
295 (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"), |
294 ], |
296 ], |
295 # warnings |
297 # warnings |
296 [ |
298 [ |
297 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"), |
299 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"), |
298 ] |
300 ] |