X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8091b2503d12dd0110e0f1a9ed1e6b830aa668ed..72a3408965f944f39f1080a5b67c25790acdc4e2:/src/black/lines.py 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