]> 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:

Remove unnecessary if-statement in maybe_make_parens_invisible_in_atom (#964)
authorJoe Antonakakis <jma353@cornell.edu>
Sat, 3 Aug 2019 23:33:23 +0000 (16:33 -0700)
committerJelle Zijlstra <jelle.zijlstra@gmail.com>
Sat, 3 Aug 2019 23:33:23 +0000 (16:33 -0700)
black.py

index 910a0ed1e3748f5996620d2cf4bedd3b199b01b3..f7022d8014c4a9aef3474d28ca153a60984a56d2 100644 (file)
--- a/black.py
+++ b/black.py
@@ -3008,8 +3008,7 @@ def maybe_make_parens_invisible_in_atom(node: LN, parent: LN) -> bool:
         # make parentheses invisible
         first.value = ""  # type: ignore
         last.value = ""  # type: ignore
         # make parentheses invisible
         first.value = ""  # type: ignore
         last.value = ""  # type: ignore
-        if len(node.children) > 1:
-            maybe_make_parens_invisible_in_atom(node.children[1], parent=parent)
+        maybe_make_parens_invisible_in_atom(node.children[1], parent=parent)
         return False
 
     return True
         return False
 
     return True