X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0677a539370b296399854e427ce7df2955ecfe57..e5f8251704c22b143b79474905c6c4b7e10ddb47:/black.py diff --git a/black.py b/black.py index dc02128..da7af03 100644 --- a/black.py +++ b/black.py @@ -22,7 +22,7 @@ from blib2to3 import pygram, pytree from blib2to3.pgen2 import driver, token from blib2to3.pgen2.parse import ParseError -__version__ = "18.3a3" +__version__ = "18.3a4" DEFAULT_LINE_LENGTH = 88 # types syms = pygram.python_symbols @@ -754,13 +754,13 @@ class EmptyLineTracker: def _maybe_empty_lines(self, current_line: Line) -> Tuple[int, int]: max_allowed = 1 - if current_line.is_comment and current_line.depth == 0: + if current_line.depth == 0: max_allowed = 2 if current_line.leaves: # Consume the first leaf's extra newlines. first_leaf = current_line.leaves[0] before = first_leaf.prefix.count('\n') - before = min(before, max(before, max_allowed)) + before = min(before, max_allowed) first_leaf.prefix = '' else: before = 0