X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/3aad6e385bfbd4348b2e13695cb6741806951160..e1036119f264a846bb049fad8404df318bc2f455:/src/black/linegen.py diff --git a/src/black/linegen.py b/src/black/linegen.py index 0091cbb..ad21307 100644 --- a/src/black/linegen.py +++ b/src/black/linegen.py @@ -918,6 +918,13 @@ def bracket_split_build_line( ) if isinstance(node, Node) and isinstance(node.prev_sibling, Leaf) ) + # Except the false negatives above for PEP 604 unions where we + # can't add the comma. + and not ( + leaves[0].parent + and leaves[0].parent.next_sibling + and leaves[0].parent.next_sibling.type == token.VBAR + ) ) if original.is_import or no_commas: