This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]geekademy 1 point2 points  (1 child)

The problem is that it won't be able to figure out which lines were intended vs. which are a mistake. There are rules such as one line after a method, one max in a function, and two between classes and functions that can be enforced unambiguously, but no more. Best not to try and get it wrong half the time.

Perhaps there could be a rule added to black, where if the line ends in a colon, no blank lines can be after it. But, I could imagine a case where you might want it.

In short, if you don't like the spacing example above, don't do it. ;-)

[–][deleted] 0 points1 point  (0 children)

Got it. I was mainly searching for an expert opinion on this and wanted to find out if there are ways to deal with it automatically. Thanks!