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

line_length=1 to reduce churn (#1092)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Mon, 28 Oct 2019 14:25:42 +0000 (07:25 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Mon, 28 Oct 2019 14:25:42 +0000 (15:25 +0100)
black.py
tests/data/collections.py
tests/data/composition.py

index 5e357ba307c187cd990b2a69cc08a50ee57a579a..00de8d23245e92cc4ee42a9d83c3eda004f54e40 100644 (file)
--- a/black.py
+++ b/black.py
@@ -2406,7 +2406,9 @@ def split_line(
             # All splits failed, best effort split with no omits.
             # This mostly happens to multiline strings that are by definition
             # reported as not fitting a single line.
-            yield from right_hand_split(line, line_length, features=features)
+            # line_length=1 is silly, but somehow produces better formatting
+            # than other things we've tried so far. See #762 and #781.
+            yield from right_hand_split(line, line_length=1, features=features)
 
         if line.inside_brackets:
             split_funcs = [delimiter_split, standalone_comment_split, rhs]
index d408bf9d3cc2822cb4fbec2031cb523e57df1fff..ebe8d3c52008c0f21e88b5f75ea80e26b5f06367 100644 (file)
@@ -144,9 +144,10 @@ division_result_tuple = (6 / 2,)
 print("foo %r", (foo.bar,))
 
 if True:
-    IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING = Config.IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING | {
-        pylons.controllers.WSGIController
-    }
+    IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING = (
+        Config.IGNORED_TYPES_FOR_ATTRIBUTE_CHECKING
+        | {pylons.controllers.WSGIController}
+    )
 
 if True:
     ec2client.get_waiter("instance_stopped").wait(
index 31f5bd5ebd5b0601817eb8c646c0094d8a962b86..ac63e46751a466260ce819ec0f1c05817fa88d34 100644 (file)
@@ -166,14 +166,17 @@ class C:
             _C.__init__.__code__.co_firstlineno + 1,
         )
 
-        assert expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect == {
-            key1: value1,
-            key2: value2,
-            key3: value3,
-            key4: value4,
-            key5: value5,
-            key6: value6,
-            key7: value7,
-            key8: value8,
-            key9: value9,
-        }
+        assert (
+            expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect
+            == {
+                key1: value1,
+                key2: value2,
+                key3: value3,
+                key4: value4,
+                key5: value5,
+                key6: value6,
+                key7: value7,
+                key8: value8,
+                key9: value9,
+            }
+        )