X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8091b2503d12dd0110e0f1a9ed1e6b830aa668ed..c5df7b7d3ca5b568a81a9ccc1f647c183e8b4075:/src/black/lines.py?ds=sidebyside diff --git a/src/black/lines.py b/src/black/lines.py index 08281bc..2aa675c 100644 --- a/src/black/lines.py +++ b/src/black/lines.py @@ -520,7 +520,8 @@ class EmptyLineTracker: and (self.semantic_leading_comment is None or before) ): self.semantic_leading_comment = block - elif not current_line.is_decorator: + # `or before` means this decorator already has an empty line before + elif not current_line.is_decorator or before: self.semantic_leading_comment = None self.previous_line = current_line