check-code: reject import Queue, suggest util.queue class for py3 compat
authortimeless <timeless@mozdev.org>
Wed, 06 Apr 2016 20:08:18 +0000
changeset 28820 9848a6c77a9b
parent 28819 826d457df138
child 28821 d3369dc6c1d0
check-code: reject import Queue, suggest util.queue class for py3 compat
contrib/check-code.py
--- a/contrib/check-code.py	Wed Apr 06 20:07:51 2016 +0000
+++ b/contrib/check-code.py	Wed Apr 06 20:08:18 2016 +0000
@@ -315,6 +315,7 @@
     # XXX only catch mutable arguments on the first line of the definition
     (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"),
     (r'\butil\.Abort\b', "directly use error.Abort"),
+    (r'^import Queue', "don't use Queue, use util.queue + util.empty"),
   ],
   # warnings
   [