Skip to content

Unnecessary split in left hand side of assignment due to multiline string #749

@matejbasic

Description

@matejbasic

Hi, I'm experience strange behavior when I use dicts and triple-quotes strings, for example:

a["b"] = f"""Some really long
    long string."""

ends up like this:

a[
   "b"
] = f"""Some really long
    long string."""

Is it expected behavior or? If yes, how can one disable it?

Operating system: Linux Ubuntu 18.04
Python version: 3.6
Black version: 18.9b0
Does also happen on master: yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    F: linebreakHow should we split up lines?R: duplicateThis issue or pull request already existsT: styleWhat do we want Blackened code to look like?
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions