Commit e0d76672 authored by James Addison's avatar James Addison Committed by Łukasz Langa
Browse files

Simplification: only yield empty omit list when magic trailing comma is present

parent 829331a8
Loading
Loading
Loading
Loading
+1 −1
Changes for src/black/__init__.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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