Mercurial > hg
comparison contrib/check-code.py @ 29217:2f9ad6ca19c2
check-code: reject .next(...)
author | timeless <timeless@mozdev.org> |
---|---|
date | Mon, 16 May 2016 21:18:59 +0000 |
parents | c641b8dfb98c |
children | 4dd530df4742 |
comparison
equal
deleted
inserted
replaced
29216:ead25aa27a43 | 29217:2f9ad6ca19c2 |
---|---|
326 (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"), | 326 (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"), |
327 (r'\butil\.Abort\b', "directly use error.Abort"), | 327 (r'\butil\.Abort\b', "directly use error.Abort"), |
328 (r'^import Queue', "don't use Queue, use util.queue + util.empty"), | 328 (r'^import Queue', "don't use Queue, use util.queue + util.empty"), |
329 (r'^import cStringIO', "don't use cStringIO.StringIO, use util.stringio"), | 329 (r'^import cStringIO', "don't use cStringIO.StringIO, use util.stringio"), |
330 (r'^import urllib', "don't use urllib, use util.urlreq/util.urlerr"), | 330 (r'^import urllib', "don't use urllib, use util.urlreq/util.urlerr"), |
331 (r'\.next\(\)', "don't use .next(), use next(...)"), | |
331 ], | 332 ], |
332 # warnings | 333 # warnings |
333 [ | 334 [ |
334 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"), | 335 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"), |
335 ] | 336 ] |