[PATCH 4 of 6 v4] debuginstall: expose modulepolicy

Yuya Nishihara yuya at tcha.org
Thu May 19 10:49:53 EDT 2016


On Wed, 18 May 2016 14:13:07 -0400, Augie Fackler wrote:
> > On May 18, 2016, at 14:00, timeless <timeless at gmail.com> wrote:
> >   
> >> +def modulepolicy():
> >> +    from . import modulepolicy
> >> +    return modulepolicy  
> > 
> > Personally, I'd like this. I did it the hard way because iirc augie
> > objected to that style saying it's poor form.  
> 
> I'm generally opposed to imports hidden inside functions because it's a great
> way to hide circular dependencies.

Since there isn't circular dependencies, we could move the import outside of
the function. But we'll need a way to silence the import checker.


More information about the Mercurial-devel mailing list