Re: Bugfix on #29103 creates different bug

2019-04-15 Thread Claude Paroz
For the record, the ticket is https://code.djangoproject.com/ticket/30371. The discussion continues there. Claude Le lundi 15 avril 2019 16:56:46 UTC+2, Melvyn Sopacua | 3YOURMIND a écrit : > > Well, the testcase is a bit hard. I can reproduce it by calling > `sqlmigrate` on any migration that

Re: Bugfix on #29103 creates different bug

2019-04-15 Thread Melvyn Sopacua | 3YOURMIND
Well, the testcase is a bit hard. I can reproduce it by calling `sqlmigrate` on any migration that adds a char or text field with a default value. The migration it self will go through, but sqlmigrate will fail. I'll look into testcasing that. On Mon, Apr 15, 2019 at 3:25 PM Claude Paroz wrote:

Re: Proposal to format Django using black

2019-04-15 Thread charettes
Florian, This option turns off *all* string normalization and not only quote normalization. We wanted to still have prefixes stripping because of our usage of __future__.unicode_literals for example. Cheers, Simon Le lundi 15 avril 2019 04:12:13 UTC-4, Florian Apolloner a écrit : > > Hi Simon

Re: Proposal to format Django using black

2019-04-15 Thread Tim Allen
Another plus one for Black, without getting too into the weeds. I think the time is will save likely outweigh the valid concerns posted here. I've used Black extensively on several projects, and much like f-strings, the last Pink Floyd album, and broccoli, have found I really like something I di

Re: Bugfix on #29103 creates different bug

2019-04-15 Thread Claude Paroz
Please create a new ticket (where you can reference the original one). If you can provide a failing test case, it would be great. Claude Le lundi 15 avril 2019 13:40:53 UTC+2, Melvyn Sopacua | 3YOURMIND a écrit : > Hi, > > I've added a comment on the commit: > https://github.com/django/django/c

Re: Proposal to format Django using black

2019-04-15 Thread René Fleschenberg
Hi Ned. > Try the latest black.  A multi-line lists with comments on each line is > not converted to a one-line list.  The lined-up indentation of the > comments is lost :(, but it's still multi-line. Hmmm, I tried commit cea13f4 (current master at the time of this writing). It turned l = [

Re: Proposal to format Django using black

2019-04-15 Thread Ned Batchelder
On 4/15/19 7:13 AM, René Fleschenberg wrote: Hi HMS = "%H:%M:%S"  # 14:30:59 HMSF = ".." HM = ".." TIME_INPUT_FORMATS  = [HMS, HMSF, HM] Just my two cents: This particular rule is the main reason why I personally have not adopted black yet. I really find the one-item-per-line style *much* mo

Bugfix on #29103 creates different bug

2019-04-15 Thread Melvyn Sopacua | 3YOURMIND
Hi, I've added a comment on the commit: https://github.com/django/django/commit/3c4ff2176323dd20507e35658599da220fbe1741 Should I reopen the bug or create a new one? Also it would help to know what the return type is supposed to be or what the intention of the code is? Should the if clause be `no

Re: Proposal to format Django using black

2019-04-15 Thread René Fleschenberg
Hi > HMS = "%H:%M:%S"  # 14:30:59 > HMSF = ".."  > HM = ".." > TIME_INPUT_FORMATS  = [HMS, HMSF, HM] Just my two cents: This particular rule is the main reason why I personally have not adopted black yet. I really find the one-item-per-line style *much* more readable in many cases. In natural-la

Re: Proposal to format Django using black

2019-04-15 Thread Josh Smeaton
Yes, let’s not discuss the tools choice in quotes, that’s for another place. To provide some information though, black will not convert single quote strings if the string itself contains a double quote. It won’t escape the character, it’ll use single quotes. On Mon, 15 Apr 2019 at 18:48, Kye Russe

Re: Proposal to format Django using black

2019-04-15 Thread Kye Russell
This is something discussed af length on the black issue tracker and not something the author wishes to change. On Mon, 15 Apr 2019 at 4:47 pm, Dmitriy Sintsov wrote: > Why can't it use mixed quotes, single quotes for all strings except the > strings that contain single quote characters? I think

Re: Proposal to format Django using black

2019-04-15 Thread Dmitriy Sintsov
Why can't it use mixed quotes, single quotes for all strings except the strings that contain single quote characters? I think mixed syntax of strings is made in various programming languages so both single and double quotes can be used inside strings not having to use ugly backslash escaping. M

Re: Proposal to format Django using black

2019-04-15 Thread Florian Apolloner
Hi, as Adam points out 1.0 is on it's way. My mails were written with that knowledge and assumption, sorry for not making this clear. I did actually had in mind to wait till it is out of beta -- which is most likely before we finished our discussions :D Cheers, Florian On Monday, April 15, 201

Re: Proposal to format Django using black

2019-04-15 Thread Florian Apolloner
Hi Simon, On Monday, April 15, 2019 at 1:02:49 AM UTC+2, charettes wrote: > > and there's no way to turn off only this form of string normalization, > it's all or nothing. > So the black --help output lists: -S, --skip-string-normalization Don't normalize string quotes or prefixes. Or does tha

Re: Proposal to format Django using black

2019-04-15 Thread Adam Johnson
Lukasz Langa, the developer, said he will tag the first non-beta version in "Early April." https://twitter.com/llanga/status/1106247623802060802 There won't be any significant changes when it leaves beta afaiu. On Mon, 15 Apr 2019 at 08:40, Scot Hacker wrote: > Just bringing this up for the sa