From 829331a8777aa758c6fc2a5032d38d8fbb5b5ac6 Mon Sep 17 00:00:00 2001 From: James Addison Date: Thu, 4 Feb 2021 17:45:45 +0000 Subject: [PATCH 1/1] Simplification: only use special-case token retrieval logic 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 7f727b1..56f180a 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -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: -- 2.39.5