[PATCH 3 of 3] check-code: reject .next(...)
timeless
timeless at fmr.im
Mon May 16 21:54:39 UTC 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1463433539 0
# Mon May 16 21:18:59 2016 +0000
# Node ID a5afd5fc9598ce6497fbb65259185f7f1c73fccb
# Parent bbcfd471e0c5281f97046627967e85fd2f96d2a6
# Available At bb://timeless/mercurial-crew
# hg pull bb://timeless/mercurial-crew -r a5afd5fc9598
check-code: reject .next(...)
diff -r bbcfd471e0c5 -r a5afd5fc9598 contrib/check-code.py
--- a/contrib/check-code.py Mon May 16 21:30:53 2016 +0000
+++ b/contrib/check-code.py Mon May 16 21:18:59 2016 +0000
@@ -328,6 +328,7 @@
(r'^import Queue', "don't use Queue, use util.queue + util.empty"),
(r'^import cStringIO', "don't use cStringIO.StringIO, use util.stringio"),
(r'^import urllib', "don't use urllib, use util.urlreq/util.urlerr"),
+ (r'\.next\(\)', "don't use .next(), use next(...)"),
],
# warnings
[
More information about the Mercurial-devel
mailing list