[PATCH 7 of 7] check-code: reject import cStringIO

Augie Fackler raf at durin42.com
Fri Apr 8 22:01:45 EDT 2016


On Fri, Apr 08, 2016 at 11:22:51AM -0500, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1460127658 0
> #      Fri Apr 08 15:00:58 2016 +0000
> # Node ID eedcfda1388d40f947f9fa616817f8f46b3a4ce6
> # Parent  d08199e5ab0891449c03373c1abb5fc491241b20
> check-code: reject import cStringIO
>

queued thanks

> diff --git a/contrib/check-code.py b/contrib/check-code.py
> --- a/contrib/check-code.py
> +++ b/contrib/check-code.py
> @@ -316,6 +316,7 @@
>      (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"),
> +    (r'^import cStringIO', "don't use cStringIO.StringIO, use util.stringio"),
>    ],
>    # warnings
>    [
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list