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

Add `explode_split` to documentation
authorŁukasz Langa <lukasz@langa.pl>
Tue, 24 Apr 2018 21:27:21 +0000 (14:27 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Tue, 24 Apr 2018 21:27:21 +0000 (14:27 -0700)
black.py
docs/reference/reference_functions.rst

index e899f7f0908a022baa92e2c2a205de44c99d47a0..5458198b17560621545fdcb0d15a4c32fcdb6522 100644 (file)
--- a/black.py
+++ b/black.py
@@ -1984,13 +1984,14 @@ def standalone_comment_split(line: Line, py36: bool = False) -> Iterator[Line]:
 def explode_split(
     line: Line, py36: bool = False, omit: Collection[LeafID] = ()
 ) -> Iterator[Line]:
-    """Split by RHS and immediately split contents by a delimiter."""
+    """Split by rightmost bracket and immediately split contents by a delimiter."""
     new_lines = list(right_hand_split(line, py36, omit))
     if len(new_lines) != 3:
         yield from new_lines
         return
 
     yield new_lines[0]
+
     try:
         yield from delimiter_split(new_lines[1], py36)
     except CannotSplit:
index 40d9665138cd6de9919ee2814d8571c4e2df8a1a..d0ded95e4a6d1110640786b431832dbde973f94d 100644 (file)
@@ -60,6 +60,8 @@ Split functions
 
 .. autofunction:: black.delimiter_split
 
+.. autofunction:: black.explode_split
+
 .. autofunction:: black.left_hand_split
 
 .. autofunction:: black.right_hand_split