X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/35722dff623f3cdf5018e3f1183cd4e02e91caa8..01b8d3d4095ebdb91d0d39012a517931625c63cb:/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: