Commit e027fc9e authored by Jelle Zijlstra's avatar Jelle Zijlstra Committed by Łukasz Langa
Browse files

line_length=1 to reduce churn (#1092)

parent 6dca5278
Loading
Loading
Loading
Loading
+3 −1
Changes for black.py: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -2406,7 +2406,9 @@ def rhs(line: Line, features: Collection[Feature]) -> Iterator[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]
+4 −3
Changes for tests/data/collections.py: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -144,9 +144,10 @@
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(
+4 −1
Changes for tests/data/composition.py: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -166,7 +166,9 @@ def tricky_asserts(self) -> None:
            _C.__init__.__code__.co_firstlineno + 1,
        )

        assert expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect == {
        assert (
            expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect
            == {
                key1: value1,
                key2: value2,
                key3: value3,
@@ -177,3 +179,4 @@ def tricky_asserts(self) -> None:
                key8: value8,
                key9: value9,
            }
        )