Skip to content

Black always explodes the rightmost bracket pair when a trailing comma is present #1619

@ambv

Description

@ambv
--- /tmp/wat.py	2020-08-24 11:48:49.409868 +0000
+++ /tmp/wat.py	2020-08-24 11:49:16.096574 +0000
@@ -1,5 +1,4 @@
 if False:
-    x = {
-        "a": 1,
-        "b": 2,
-    }["a"]
+    x = {"a": 1, "b": 2,}[
+        "a"
+    ]

Originally posted by @GianlucaFicarelli in #1288 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions