[PATCH 5 of 5]fix_leftover_imports: use absolute_import

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Mar 11 10:27:06 EST 2016



On 03/11/2016 02:45 PM, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1457233883 -19800
> #      Sun Mar 06 08:41:23 2016 +0530
> # Node ID dd3485c29f7380e7c548344b678886a1b2f4a8ef
> # Parent  c741efc029cc80cfdee5b2fa8f449028b8a1f204
> fix_leftover_imports: use absolute_import

Patch 4-5 does not applies here. Did ou managed to configure patchbomb ?

>
> diff -r c741efc029cc -r dd3485c29f73 contrib/hgfixes/fix_leftover_imports.py
> --- a/contrib/hgfixes/fix_leftover_imports.py    Sun Mar 06 08:35:49 2016 +0530
> +++ b/contrib/hgfixes/fix_leftover_imports.py    Sun Mar 06 08:41:23 2016 +0530
> @@ -7,8 +7,13 @@
>   # bit more thinking, a more generic fixer can be implemented, but I'll leave
>   # that as future work.
>
> -from lib2to3.fixer_util import Name
> -from lib2to3.fixes import fix_imports
> +from __future__ import absolute_import
> +from lib2to3.fixer_util import (
> +Name,
> +)
> +from lib2to3.fixes import (
> +fix_imports,
> +)
>
>   # This maps the old names to the new names. Note that a drawback of the current
>   # design is that the dictionary keys MUST have EXACTLY one dot (.) in them,
> diff -r c741efc029cc -r dd3485c29f73 tests/test-check-py3-compat.t
> --- a/tests/test-check-py3-compat.t    Sun Mar 06 08:35:49 2016 +0530
> +++ b/tests/test-check-py3-compat.t    Sun Mar 06 08:41:23 2016 +0530
> @@ -3,7 +3,6 @@
>     $ cd "$TESTDIR"/..
>
>     $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python
> contrib/check-py3-compat.py
> -  contrib/hgfixes/fix_leftover_imports.py not using absolute_import
>     contrib/import-checker.py not using absolute_import
>     contrib/import-checker.py requires print_function
>     contrib/memory.py not using absolute_import
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list