From: Ɓukasz Langa Date: Thu, 24 May 2018 20:32:52 +0000 (-0700) Subject: Remove remains of extra empty lines for flow control statements X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/e9a940d69e789ce8caf1f3c1ded786dc102df2fd?ds=sidebyside;hp=bbed104e6d3e89ebb8da7c209b842e8a96bcd5de Remove remains of extra empty lines for flow control statements --- diff --git a/black.py b/black.py index a31aa7a..05ec00c 100644 --- a/black.py +++ b/black.py @@ -971,27 +971,6 @@ class Line: and second_leaf.value == "def" ) - @property - def is_flow_control(self) -> bool: - """Is this line a flow control statement? - - Those are `return`, `raise`, `break`, and `continue`. - """ - return ( - bool(self) - and self.leaves[0].type == token.NAME - and self.leaves[0].value in FLOW_CONTROL - ) - - @property - def is_yield(self) -> bool: - """Is this line a yield statement?""" - return ( - bool(self) - and self.leaves[0].type == token.NAME - and self.leaves[0].value == "yield" - ) - @property def is_class_paren_empty(self) -> bool: """Is this a class with no base classes but using parentheses? @@ -1224,8 +1203,7 @@ class EmptyLineTracker: """Return the number of extra empty lines before and after the `current_line`. This is for separating `def`, `async def` and `class` with extra empty - lines (two on module-level), as well as providing an extra empty line - after flow control keywords to make them more prominent. + lines (two on module-level). """ if isinstance(current_line, UnformattedLines): return 0, 0