changeset 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 826d457df138
children d3369dc6c1d0
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
   [