Re: Adopting the black Python code style

2020-10-21 Thread Andrew Overholt
Hi, Unfortunately I don't think consensus is possible with code formatting. Partly for that reason, we (Fx engineering leadership and others) have concluded that automatic, standardized code formatting is the right thing to do. We've already done this for a few languages and Python is up next. R

Re: Adopting the black Python code style

2020-10-20 Thread Jeff Gilbert
Well we generally don't seek consensus anymore for these sorts of things, it seems, but it's reassuring that I'm not alone. On Tue, Oct 20, 2020 at 1:17 AM James Graham wrote: > > On 19/10/2020 22:01, Jeff Gilbert wrote: > > I'm disappointed by that. > > FWIW last time I looked at black, I found

Re: Adopting the black Python code style

2020-10-20 Thread James Graham
On 19/10/2020 22:01, Jeff Gilbert wrote: I'm disappointed by that. FWIW last time I looked at black, I found that the compromises it made to be fully automatic and with minimal configuration meant that it was liable to produce ugly or difficult to read code in some situations. I understand

Re: Adopting the black Python code style

2020-10-19 Thread Jeff Gilbert
I'm disappointed by that. On Mon, Oct 19, 2020 at 2:00 PM Ricky Stewart wrote: > > On Monday, October 19, 2020 at 8:53:59 AM UTC-5, Andrew Halberstadt wrote: > > No, black now has a `--skip-string-normalization` flag, which I would be > > all for using in our code base. Not sure if that was the p

Re: Adopting the black Python code style

2020-10-19 Thread Ricky Stewart
On Monday, October 19, 2020 at 8:53:59 AM UTC-5, Andrew Halberstadt wrote: > No, black now has a `--skip-string-normalization` flag, which I would be > all for using in our code base. Not sure if that was the plan here or not. > > -Andrew > > p.s It took a great deal of convincing from the com

Re: Adopting the black Python code style

2020-10-19 Thread Andrew Halberstadt
No, black now has a `--skip-string-normalization` flag, which I would be all for using in our code base. Not sure if that was the plan here or not. -Andrew p.s It took a great deal of convincing from the community to get this flag added, as the maintainers precisely wanted to prevent conversation

Re: Adopting the black Python code style

2020-10-15 Thread Mike Hommey
Is black still opiniated about string types and insisting to use double quotes, when we mostly settled on single quotes? On Mon, Oct 12, 2020 at 10:00:56AM -0700, Ricky Stewart wrote: > Hello everyone, > > If you don't write Python code in mozilla-central, you can stop reading now. > > On Octobe

Re: Adopting the black Python code style

2020-10-15 Thread Andrew Halberstadt
Thanks for driving this Ricky! I'm *very* excited for it. Just want to call out that you can use: $ ./mach lint -wo --fix to reformat all the files you have touched (either in the working directory or outgoing commits). For more usage docs, see: https://firefox-source-docs.mozilla.org/code-quali

Re: Adopting the black Python code style

2020-10-14 Thread Ricky Stewart
On Monday, October 12, 2020 at 12:22:22 PM UTC-5, Andrew McCreight wrote: > On Mon, Oct 12, 2020 at 10:05 AM Ricky Stewart wrote: > > > Hello everyone, > > > > If you don't write Python code in mozilla-central, you can stop reading > > now. > > > > On October 19, 2020 we will be officially

Re: Adopting the black Python code style

2020-10-12 Thread Andrew McCreight
On Mon, Oct 12, 2020 at 10:05 AM Ricky Stewart wrote: > Hello everyone, > > If you don't write Python code in mozilla-central, you can stop reading > now. > > On October 19, 2020 we will be officially adopting the black Python style > for all our Python code in mozilla-central. > > black (https:/