From 0cbe19c813559d6642e71832242264ab8d5a5d59 Mon Sep 17 00:00:00 2001 From: James Addison Date: Wed, 10 Feb 2021 12:33:50 +0000 Subject: [PATCH] Minimize changes: more closely resemble original conditional logic --- 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 c2b0ad4..0b734ad 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -6658,7 +6658,7 @@ def can_omit_invisible_parens( # unnecessary. return True - if penultimate.type == token.COMMA: + if line.magic_trailing_comma and penultimate.type == token.COMMA: # The rightmost non-omitted bracket pair is the one we want to explode on. return True -- 2.39.5