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

Line break before operator added only with --experimental-string-processing #2491

Open
Zac-HD opened this issue Sep 11, 2021 · 1 comment
Open
Labels
F: linebreak How should we split up lines? F: strings Related to our handling of strings T: bug Something isn't working

Comments

@Zac-HD
Copy link
Contributor

Zac-HD commented Sep 11, 2021

Running Black on the following code makes no changes:

(
    "whatever" == "a very long string broken across two lines.  "
    "If you put this on one line it would be too long."
)

unless you add --experimental-string-processing, in which case a newline is added before ==:

(
    "whatever"
    == "a very long string broken across two lines.  "
    "If you put this on one line it would be too long."
)

I don't have a strong view on which is better, but they should probably be consistent. Related to #2188.

@Zac-HD Zac-HD added the T: bug Something isn't working label Sep 11, 2021
@Zac-HD Zac-HD changed the title Line break before operator added only with Line break before operator added only with --experimental-string-processing Sep 11, 2021
@DanielNoord
Copy link
Contributor

Is the placement of the operator on the second line intentional? Currently this makes --experimental-string-processing incompatible with main, as it wants to put the operator + compared value back on the first line.

Schermafbeelding 2022-06-09 om 10 33 30

Personally I think operator on the same line is more readable, but I guess this is just a stylistic change I'll need to get used to. Either way, placement of the operator is probably something that should be consistent on main and --experimental-string-processing right?

@ichard26 ichard26 added F: strings Related to our handling of strings F: linebreak How should we split up lines? labels Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: linebreak How should we split up lines? F: strings Related to our handling of strings T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants