Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

string_processing: Worse formatting of assert #3210

Open
hauntsaninja opened this issue Aug 5, 2022 · 0 comments
Open

string_processing: Worse formatting of assert #3210

hauntsaninja opened this issue Aug 5, 2022 · 0 comments
Labels
C: preview style Issues with the preview and unstable style. Add the name of the responsible feature in the title. F: linebreak How should we split up lines? F: strings Related to our handling of strings T: bug Something isn't working T: style What do we want Blackened code to look like?

Comments

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Aug 5, 2022

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==

@hauntsaninja hauntsaninja added the T: bug Something isn't working label Aug 5, 2022
@ichard26 ichard26 added T: style What do we want Blackened code to look like? F: linebreak How should we split up lines? labels Aug 11, 2022
@JelleZijlstra JelleZijlstra added the C: preview style Issues with the preview and unstable style. Add the name of the responsible feature in the title. label Dec 19, 2022
@hauntsaninja hauntsaninja added the F: strings Related to our handling of strings label Sep 3, 2023
@JelleZijlstra JelleZijlstra changed the title Worse formatting of assert with --preview string_processing: Worse formatting of assert Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: preview style Issues with the preview and unstable style. Add the name of the responsible feature in the title. F: linebreak How should we split up lines? F: strings Related to our handling of strings T: bug Something isn't working T: style What do we want Blackened code to look like?
Projects
None yet
Development

No branches or pull requests

3 participants