X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8091b2503d12dd0110e0f1a9ed1e6b830aa668ed..1557f7d3a380ed38801f5fada27550c10f89870f:/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