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

Formatter: Expands function call after multi-line string #6500

Closed
Tracked by #6069
konstin opened this issue Aug 11, 2023 · 3 comments
Closed
Tracked by #6069

Formatter: Expands function call after multi-line string #6500

konstin opened this issue Aug 11, 2023 · 3 comments
Labels
formatter Related to the formatter

Comments

@konstin
Copy link
Member

konstin commented Aug 11, 2023

"""
{}
""".format("hi")

should be formatted as

"""
{}
""".format(
    "hi"
)

This depends on the string content, e.g.

"""{}""".format("hi")

does not get expanded.

@konstin konstin added the formatter Related to the formatter label Aug 11, 2023
@charliermarsh
Copy link
Member

Okay, I think it's psf/black#256 and psf/black#1879. Closing as I think this is reasonable given it's in preview.

@charliermarsh
Copy link
Member

However, there's another behavior implemented in the linked PRs that we don't have: #6581.

@MichaReiser MichaReiser added this to the Formatter: Alpha milestone Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter
Projects
None yet
Development

No branches or pull requests

3 participants