[Cubicweb] a script to save you time during development/project cleaning: autocommit the fixes of autopep8 so you don't have to do it by hand

Laurent Peuch cortex at worlddomination.be
Tue May 7 19:23:53 CEST 2019


On Tue, May 07, 2019 at 01:36:44PM +0200, Denis Laxalde wrote:
> Laurent Peuch a écrit :
> > On Fri, May 03, 2019 at 09:26:21AM +0200, Arthur Lutz wrote:
> > > Am in favor of choosing having a massive apply of this
> > > autocommitautopep8 strategy. Maybe we need to select the cubes which
> > > have a sufficient test coverage (or some other criteria) in case things
> > > get broken.
> > > 
> > > Have you come across problems introduced by this approach or is it just
> > > when you're stuck in the middle of an series ?
> > 
> > Denis found a situation where an autopep8 patchs for only one pep8
> > error introduced another one in the middle of a serie. This is due to
> > the "one error category per commit", autopep8 works by launching the
> > pep8 tools, parsing its output and stop once pep8 doesn't return
> > anything (or after 100 launch I think) so in a single-patch approach
> > it would have fixed this newly created error.
> 
> Perhaps we could then loop on previously-fixed errors until we make sure
> there's no regression?

We can also do that yes. We can also try to merge the matching commit
I guess but that would be quite some work for what it is.

> > But a single-patch approach makes things harder to review :/ (if we
> > really wants to review them)
> 
> By the way, https://mobile.twitter.com/llanga/status/1123980466292445190

We can also switch to black if you want :) I've made this choice based
on the pratices I've seen here to match the culture the most in hope
of having a higher chance of this being accepted, but it might not be
the best choice.

-- 

Laurent Peuch -- Bram



More information about the Cubicweb mailing list