# HG changeset patch # User timeless # Date 2016-04-06 20:08:18 # Node ID 9848a6c77a9b2d26ddc343830c064a24162e6b50 # Parent 826d457df138096df9e450b91665bc14681b7210 check-code: reject import Queue, suggest util.queue class for py3 compat diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -315,6 +315,7 @@ pypats = [ # 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 [