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

Simplification: only use special-case token retrieval logic when magic trailing comma is present

parent 89c42a00
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
@@ -6632,7 +6632,7 @@ def can_omit_invisible_parens(

    penultimate = line.leaves[-2]
    last = line.leaves[-1]
    if line.should_split or line.magic_trailing_comma:
    if line.magic_trailing_comma:
        try:
            penultimate, last = last_two_except(line.leaves, omit=omit_on_explode)
        except LookupError: