From: Ɓukasz Langa Date: Thu, 15 Mar 2018 18:28:59 +0000 (-0700) Subject: Fix spurious space in parenthesized set expressions X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/174fc47b7893b98d4a4393da849c09b6bd415764 Fix spurious space in parenthesized set expressions Fixes #7 --- diff --git a/README.md b/README.md index 28f79db..63fb4b2 100644 --- a/README.md +++ b/README.md @@ -255,6 +255,8 @@ You can still try but prepare to be disappointed. * fixed invalid spacing of dots in relative imports (#6, #13) +* fixed spurious space in parenthesized set expressions (#7) + ### 18.3a0 diff --git a/black.py b/black.py index 7ae2627..64df7f7 100644 --- a/black.py +++ b/black.py @@ -895,6 +895,7 @@ def whitespace(leaf: Leaf) -> str: syms.or_test, syms.and_test, syms.arith_expr, + syms.expr, syms.shift_expr, syms.yield_expr, syms.term, diff --git a/tests/expression.py b/tests/expression.py index 3291dc2..1d9f0ab 100644 --- a/tests/expression.py +++ b/tests/expression.py @@ -106,6 +106,8 @@ a = (1,) b = 1, c = 1 d = (1,) + a + (2,) +what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set(vars_to_remove) +what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set(vars_to_remove) def gen(): @@ -228,6 +230,12 @@ a = (1,) b = 1, c = 1 d = (1,) + a + (2,) +what_is_up_with_those_new_coord_names = (coord_names + set(vars_to_create)) + set( + vars_to_remove +) +what_is_up_with_those_new_coord_names = (coord_names | set(vars_to_create)) - set( + vars_to_remove +) def gen():