contrib/check-code.py
changeset 28820 9848a6c77a9b
parent 28781 c042b98a6ff8
child 28884 75309badb485
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   ]