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: Multiline string concatenated to be over line length in function argument default value #3497

Open
felix-hilden opened this issue Jan 13, 2023 · 0 comments
Labels
C: preview style Issues with the preview and unstable style. Add the name of the responsible feature in the title. F: strings Related to our handling of strings T: bug Something isn't working

Comments

@felix-hilden
Copy link
Collaborator

Describe the bug
From #2188: When processing a multiline string in a function argument default value with --preview (ESP), it is concatenated even if it will exceed line length.

To Reproduce
Here's a playground link.

def open_file_from_long_file_path(
    file_path = (
        "some/really/long/file/path/because/it/has/filehash/as/part/of/path/"
        "460e96a3b663f41a8412527424278bc60eb208ec5be1f5943e5dff2fe428a2da/"
        "file.txt"
    ),
):
    pass

is formatted as

def open_file_from_long_file_path(
    file_path="some/really/long/file/path/because/it/has/filehash/as/part/of/path/460e96a3b663f41a8412527424278bc60eb208ec5be1f5943e5dff2fe428a2da/file.txt",
):
    pass

Expected behavior
A formatting that conforms to line length limits.

@felix-hilden felix-hilden added T: bug Something isn't working F: strings Related to our handling of strings C: preview style Issues with the preview and unstable style. Add the name of the responsible feature in the title. labels Jan 13, 2023
@JelleZijlstra JelleZijlstra changed the title Multiline string concatenated to be over line length in function argument default value string_processing: Multiline string concatenated to be over line length in function argument default value 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: strings Related to our handling of strings T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant