Patchwork [3,of,3] check-code: reject .next(...)

login
register
mail settings
Submitter timeless
Date May 16, 2016, 9:54 p.m.
Message ID <a5afd5fc9598ce6497fb.1463435679@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/15153/
State Accepted
Headers show

Comments

timeless - May 16, 2016, 9:54 p.m.
# HG changeset patch
# User timeless <timeless@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(...)

Patch

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
   [