Skip to content

string_processing: Worse formatting of assert #3210

@hauntsaninja

Description

@hauntsaninja
def foo():
    assert (
        b"RuntimeError: zasnvkdifnb2rnf cannot be abcdefgh with a "
        b"bjbkjdf dfsdf of asdfasdfs"
    ) in proc.stderr

becomes:

def foo():
    assert (
        b"RuntimeError: zasnvkdifnb2rnf cannot be abcdefgh with a "
        b"bjbkjdf dfsdf of asdfasdfs"
        in proc.stderr
    )

This is a line longer and less readable, since the string is less separated from the contains

https://black.vercel.app/?version=stable&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AECALFdAD2IimZxl1N_WlbvK5V9KEd0suDTtKdXyW-KHSefTu8JiSPn-h71oSxgS8o3NQhlLDndZ3W58ds9CuIxGCnJCC4fqdLnmGL2XsQHoW6F2rU_c4ZzdT3xFe1NLC67qd2RYZ8KC38punDTElNhtQrq7GqaXmidISMsc9SFO3gOc5iR8LnLc6CyFcXNd9S7to0Quy0lmBi8ReYWcXb_ysIT0o-dIWqyZbgpr7vRvY3xz5hLvAAAAACZpmADssByiQABzQGDAgAAvD0rr7HEZ_sCAAAAAARZWg==

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.F: linebreakHow should we split up lines?F: stringsRelated to our handling of stringsT: bugSomething isn't workingT: 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