Proposal: format GDB Python files with black

Simon Marchi simon.marchi@polymtl.ca
Tue Apr 27 13:21:50 GMT 2021


> I have no objections to adopting the use of black, my only request
> would be that we formally make it a policy that "rogue" re-formatting
> hunks, as we discussed above, should be fixed in a separate commit,
> and not included in random patches.
> 
> For me, one of the great things about working on GDB is the generally
> good quality of the commits, and I feel that if commits start
> including extra reformatting this would be a step backwards.

I agree.  I thought it was kind of obvious, because it's a continuation
of what we do today: if somebody includes an unrelated formatting change
in a patch, you'll tell them about it.  But it's true that the risk of
it happening with an automated is perhaps greater, as people will run
the tool and not carefully check the output.  I happen to carefully
check the diff of my patches before sending them, but maybe not everyone
does that.

So I'll make sure to include that in the "rules to follow" for
re-formatting.

> Never mind, given the above I think you've answered my questions.
> 
> Thanks for your time,

Thanks for the questions, you raised good points I overlooked.

Simon


More information about the Gdb-patches mailing list