Skip to content

Black not line wrapping tuples with long strings #3086

@hauntsaninja

Description

@hauntsaninja

Describe the bug

Black should put parentheses and wrap this tuple over multiple lines:

def asdf():
    for item in items:
        yield item, "this is a really long string describing item. you'd expect black to put parentheses around the tuple."

To Reproduce

https://black.vercel.app/?version=stable&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4ADxAK5dAD2IimZxl1N_WlbvK5V8JNI77iY4W6dVOfyLjNFiaj70Bl3KDmvzUGa515Sxf8PkVW3bG3ae8JNP373LwFgPbvHVIPAE-XJtpbaXte5disESbEB-JtiPSKxPO0dJ9-wDbroDvrdVhhvDMK9VMixYumgWDHNgwfYwkhJSr-_yuGqWhJUZw_mE17rS3JC6V278eYev_bAfCNjaRI2eyTB4Xyv47363qrV197jUTm0eAAAAAOLHMH_IDVfUAAHKAfIBAACkdOtjscRn-wIAAAAABFla

Metadata

Metadata

Assignees

No one assigned

    Labels

    F: linetoolongBlack makes our lines too longF: stringsRelated to our handling of stringsT: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions