]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix spurious space in parenthesized set expressions
authorŁukasz Langa <lukasz@langa.pl>
Thu, 15 Mar 2018 18:28:59 +0000 (11:28 -0700)
committerLukasz Langa <ambv@fb.com>
Thu, 15 Mar 2018 18:28:59 +0000 (11:28 -0700)
Fixes #7

README.md
black.py
tests/expression.py

index 28f79db404736a55042fd127f1ad483b44be6924..63fb4b2e58eeac2a3eac8d53c2a97dc0d78ac53d 100644 (file)
--- 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 invalid spacing of dots in relative imports (#6, #13)
 
+* fixed spurious space in parenthesized set expressions (#7)
+
 
 ### 18.3a0
 
 
 ### 18.3a0
 
index 7ae2627769fcdabae7358002564006681ead84b5..64df7f7d67ee6353002d435bb4a873516a872cac 100644 (file)
--- 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.or_test,
         syms.and_test,
         syms.arith_expr,
+        syms.expr,
         syms.shift_expr,
         syms.yield_expr,
         syms.term,
         syms.shift_expr,
         syms.yield_expr,
         syms.term,
index 3291dc21fc0d497566e7cb14ac5f8cd3d0eb561f..1d9f0ab57ade05f8f35ef02b04962e6c6673da31 100644 (file)
@@ -106,6 +106,8 @@ a = (1,)
 b = 1,
 c = 1
 d = (1,) + a + (2,)
 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():
 
 
 def gen():
@@ -228,6 +230,12 @@ a = (1,)
 b = 1,
 c = 1
 d = (1,) + a + (2,)
 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():
 
 
 def gen():