From e0d766727dc87f5c5f39ef751d0bf23fc5ff31a0 Mon Sep 17 00:00:00 2001 From: James Addison Date: Thu, 4 Feb 2021 17:48:38 +0000 Subject: [PATCH 1/1] Simplification: only yield empty omit list when magic trailing comma is present --- src/black/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/black/__init__.py b/src/black/__init__.py index 56f180a..3eea33c 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -5949,7 +5949,7 @@ def generate_trailers_to_omit(line: Line, line_length: int) -> Iterator[Set[Leaf """ omit: Set[LeafID] = set() - if not line.should_split and not line.magic_trailing_comma: + if not line.magic_trailing_comma: yield omit length = 4 * line.depth -- 2.39.5