Skip to content

Brackets break a line when code is in multiple lines #119

@ocavue

Description

@ocavue

Python version: 3.6.4
Black version: 18.4a0
Does also happen on master: yes

It's a little difficult to explain my problem. But I think the example below should be clear.

what black outputs:

a_function_who_return_a_list(
    "a really really really really really long string with one line"
)[
    0
]

a_function_who_return_a_function(
    """a string with
    two lines"""
)(
    "argument"
)

what I expect:

a_function_who_return_a_list(
    "a really really really really really long string with one line"
)[0]

a_function_who_return_a_function(
    """a string with
    two lines"""
)("argument")

Metadata

Metadata

Assignees

No one assigned

    Labels

    T: styleWhat do we want Blackened code to look like?

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions