Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Fix spurious space in parenthesized set expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
ambv authored and Lukasz Langa committed Mar 15, 2018
1 parent e1e8909 commit 174fc47
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions black.py
Expand Up @@ -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,
Expand Down
8 changes: 8 additions & 0 deletions tests/expression.py
Expand Up @@ -106,6 +106,8 @@
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():
Expand Down Expand Up @@ -228,6 +230,12 @@ async def f():
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():
Expand Down

0 comments on commit 174fc47

Please sign in to comment.