Submitter | Augie Fackler |
---|---|
Date | Feb. 29, 2016, 6:15 p.m. |
Message ID | <a60719c394344517426b.1456769706@augie-macbookair2.roam.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/13473/ |
State | Superseded |
Headers | show |
Comments
Augie Fackler <raf@durin42.com> writes: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1456715700 18000 > # Sun Feb 28 22:15:00 2016 -0500 > # Node ID a60719c394344517426b0a35f8b54f4c34eed5f6 > # Parent e74833e8ebe905296eed4ac8a83c2812c2426d34 > # EXP-Topic pager > pager: use absolute_import Sure, sounds good to me.
> On Feb 29, 2016, at 10:15, Augie Fackler <raf@durin42.com> wrote: > > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1456715700 18000 > # Sun Feb 28 22:15:00 2016 -0500 > # Node ID a60719c394344517426b0a35f8b54f4c34eed5f6 > # Parent e74833e8ebe905296eed4ac8a83c2812c2426d34 > # EXP-Topic pager > pager: use absolute_import > > diff --git a/hgext/pager.py b/hgext/pager.py > --- a/hgext/pager.py > +++ b/hgext/pager.py > @@ -58,9 +58,16 @@ you can use --pager=<value>:: > will also work). > > ''' > +from __future__ import absolute_import > > import atexit, sys, os, signal, subprocess These should be on separate lines. Does a test not complain? > -from mercurial import commands, dispatch, util, extensions, cmdutil > +from mercurial import ( > + cmdutil, > + commands, > + dispatch, > + extensions, > + util, > + ) > from mercurial.i18n import _ > > # Note for extension authors: ONLY specify testedwith = 'internal' for > diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t > --- a/tests/test-check-py3-compat.t > +++ b/tests/test-check-py3-compat.t > @@ -73,7 +73,6 @@ > hgext/largefiles/wirestore.py not using absolute_import > hgext/mq.py not using absolute_import > hgext/notify.py not using absolute_import > - hgext/pager.py not using absolute_import > hgext/patchbomb.py not using absolute_import > hgext/purge.py not using absolute_import > hgext/rebase.py not using absolute_import > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> On Feb 29, 2016, at 13:10, Gregory Szorc <gregory.szorc@gmail.com> wrote: > >> import atexit, sys, os, signal, subprocess > > These should be on separate lines. Does a test not complain? No test-check-*.t test complained for me.
> On Feb 29, 2016, at 13:10, Gregory Szorc <gregory.szorc@gmail.com> wrote: > >> import atexit, sys, os, signal, subprocess > > These should be on separate lines. Does a test not complain? A test does in fact complain. I'll roll a v2 of the series. Thanks!
Patch
diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -58,9 +58,16 @@ you can use --pager=<value>:: will also work). ''' +from __future__ import absolute_import import atexit, sys, os, signal, subprocess -from mercurial import commands, dispatch, util, extensions, cmdutil +from mercurial import ( + cmdutil, + commands, + dispatch, + extensions, + util, + ) from mercurial.i18n import _ # Note for extension authors: ONLY specify testedwith = 'internal' for diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t +++ b/tests/test-check-py3-compat.t @@ -73,7 +73,6 @@ hgext/largefiles/wirestore.py not using absolute_import hgext/mq.py not using absolute_import hgext/notify.py not using absolute_import - hgext/pager.py not using absolute_import hgext/patchbomb.py not using absolute_import hgext/purge.py not using absolute_import hgext/rebase.py not using absolute_import