[PATCH 7 of 8] py3: make contrib/import-checker.py get along with itself

timeless timeless at gmail.com
Sun May 15 11:09:39 EDT 2016


I'm pretty sure I had a change for py 3 or pypy or something which changed
these lines because one wasn't available, so I'm glad to see the import
indented, although the inline comment explanation isn't wonderful.
On May 14, 2016 12:34 AM, "Yuya Nishihara" <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1463204025 -32400
> #      Sat May 14 14:33:45 2016 +0900
> # Node ID 4bbd966a9ebc63eedbc0c576cab9e8f2e851c8c8
> # Parent  bf2b2d35f363c27372de2c5ebd3eef4cdbc9f304
> py3: make contrib/import-checker.py get along with itself
>
> Indent these imports to disable the rule of "not lexically sorted."
>
> diff --git a/contrib/import-checker.py b/contrib/import-checker.py
> --- a/contrib/import-checker.py
> +++ b/contrib/import-checker.py
> @@ -11,8 +11,9 @@ import sys
>  # Import a minimal set of stdlib modules needed for list_stdlib_modules()
>  # to work when run from a virtualenv.  The modules were chosen empirically
>  # so that the return value matches the return value without virtualenv.
> -import BaseHTTPServer
> -import zlib
> +if True: # disable lexical sorting checks
> +    import BaseHTTPServer
> +    import zlib
>
>  # Whitelist of modules that symbols can be directly imported from.
>  allowsymbolimports = (
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160515/603b58db/attachment.html>


More information about the Mercurial-devel mailing list