Skip to content

feature_request(formatting): wrap long strings #182

@Kristinita

Description

@Kristinita

1. Summary

It would be nice, if Black will wrap long strings.

2. Example

I have SashaLongStrings.py file:

print("She's the one for me, She's my ecstasy, She's the one I need. She's one in a million, She's once in a lifetime, She made me discover one of the stars above us.")

Line contains 168 characters.

I run command:

black --line-length 120 SashaLongStrings.py

Result:

print("She's the one for me, She's my ecstasy, She's the one I need. She's one in a million, She's once in a lifetime, "
      "She made me discover one of the stars above us.")

Lines contains ≤ 120 symbols.

3. Details

See more details in my question in Software Recommendations.

Thanks.

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