Re: [Python-Dev] Code formatter bot

2016-01-25 Thread francismb
Hi, On 01/25/2016 01:28 AM, Raymond Hettinger wrote: > >> - At least it should follow PEP 7 ;-) > > Please don't do this. It misses the spirit of how the style-guides are > intended to be used. > > "I personally hate with a vengeance that there are tools named after style > guide PEPs that

Re: [Python-Dev] Code formatter bot

2016-01-24 Thread Raymond Hettinger
> On Jan 19, 2016, at 12:59 PM, francismb wrote: > > Dear Core-Devs, > what's your opinion about a code-formatter bot for cpython. > Pros, Cons, where could be applicable (new commits, new workflow, it > doesn't make sense), ... > > > - At least it should follow PEP 7 ;-)

Re: [Python-Dev] Code formatter bot

2016-01-24 Thread francismb
Hi, from your valuable feedback, here is what I thing could be a previous requirements list (lets call it for e.g. autopep7 script by now): - It should follow PEP 7 :-) - It should check PEP 7 compliance on a per file basis (for simplicity) - It should be embeddable on the test suite, returning

Re: [Python-Dev] Code formatter bot

2016-01-20 Thread Ben Finney
Andrew Barnert via Python-Dev writes: > […] it can be helpful to have both suggested editor plugins that do > the auto formatting on the dev's computer, and VCS-triggered checkers > that ensure the formatting was correct. Right, I was not intending the different stages to

Re: [Python-Dev] Code formatter bot

2016-01-20 Thread francismb
Thanks again to all persons that commented so far. > what's your opinion about a code-formatter bot for cpython. > Pros, Cons, where could be applicable (new commits, new workflow, it > doesn't make sense), ... > > > - At least it should follow PEP 7 ;-) > - ... There seems to be too much

Re: [Python-Dev] Code formatter bot

2016-01-20 Thread Andrew Barnert via Python-Dev
On Jan 20, 2016, at 00:35, Ben Finney wrote: > > francismb writes: > >> what's your opinion about a code-formatter bot for cpython. > > What is the proposal? The opinions will surely depend on: ... plus: * How does the formatter bot deal with

Re: [Python-Dev] Code formatter bot

2016-01-20 Thread Ben Finney
francismb writes: > what's your opinion about a code-formatter bot for cpython. What is the proposal? The opinions will surely depend on: * What formatting is to be applied automatically? * If you propose to enforce rigid interpretations of the style-guide PEPs as

[Python-Dev] Code formatter bot

2016-01-19 Thread francismb
Dear Core-Devs, what's your opinion about a code-formatter bot for cpython. Pros, Cons, where could be applicable (new commits, new workflow, it doesn't make sense), ... - At least it should follow PEP 7 ;-) - ... Thanks in advance, francis ___

Re: [Python-Dev] Code formatter bot

2016-01-19 Thread Sven R. Kunze
Not a core dev, but I would definitely recommend using them. Best, Sven On 19.01.2016 21:59, francismb wrote: Dear Core-Devs, what's your opinion about a code-formatter bot for cpython. Pros, Cons, where could be applicable (new commits, new workflow, it doesn't make sense), ... - At least

Re: [Python-Dev] Code formatter bot

2016-01-19 Thread Senthil Kumaran
On Tue, Jan 19, 2016 at 12:59 PM, francismb wrote: > Pros, Cons, where could be applicable (new commits, new workflow, it > doesn't make sense), ... > -1. formatting should be done by humans (with the help of tools) before committing. It should not be left to a robot to make

Re: [Python-Dev] Code formatter bot

2016-01-19 Thread Gregory P. Smith
Indeed, automated code formatting is a good thing. But a bot is the wrong approach. You want a code formatting checker as a potential pre-submit hook (like we have had for white space issues in the past), but until you have super high confidence in it you need to make sure it is not a blocker for