comparison contrib/check-code.py @ 28820:9848a6c77a9b

check-code: reject import Queue, suggest util.queue class for py3 compat
author timeless <timeless@mozdev.org>
date Wed, 06 Apr 2016 20:08:18 +0000
parents c042b98a6ff8
children 75309badb485
comparison
equal deleted inserted replaced
28819:826d457df138 28820:9848a6c77a9b
313 "use pathutil.normasprefix(path) instead of os.path.join(path, '')"), 313 "use pathutil.normasprefix(path) instead of os.path.join(path, '')"),
314 (r'\s0[0-7]+\b', 'legacy octal syntax; use "0o" prefix instead of "0"'), 314 (r'\s0[0-7]+\b', 'legacy octal syntax; use "0o" prefix instead of "0"'),
315 # XXX only catch mutable arguments on the first line of the definition 315 # XXX only catch mutable arguments on the first line of the definition
316 (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"), 316 (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"),
317 (r'\butil\.Abort\b', "directly use error.Abort"), 317 (r'\butil\.Abort\b', "directly use error.Abort"),
318 (r'^import Queue', "don't use Queue, use util.queue + util.empty"),
318 ], 319 ],
319 # warnings 320 # warnings
320 [ 321 [
321 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"), 322 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"),
322 ] 323 ]