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

Quotes types in multiline f-string literals are not formatted #2640

Closed
Numerlor opened this issue Nov 24, 2021 · 2 comments
Closed

Quotes types in multiline f-string literals are not formatted #2640

Numerlor opened this issue Nov 24, 2021 · 2 comments
Labels
F: strings Related to our handling of strings R: duplicate This issue or pull request already exists T: bug Something isn't working

Comments

@Numerlor
Copy link

Describe the bug

Single quotes in multiline f-string literals are left unchanged even when unnecessary

To Reproduce
Run black on

f"""{'a'}"""

the literal will be left unchanged

Expected behavior

The literal gets formatted into

f"""{"a"}"""

Environment

  • Black's version: 21.10b0 and main through the playground
  • OS and Python version: Windows/Python 3.9.6
@Numerlor Numerlor added the T: bug Something isn't working label Nov 24, 2021
@onerandomusername
Copy link
Contributor

onerandomusername commented Nov 24, 2021

Currently black does not format the insides of an f-string at all

https://canary.discord.com/channels/267624335836053506/846434317021741086/883545386214641684

@felix-hilden felix-hilden added F: strings Related to our handling of strings R: duplicate This issue or pull request already exists labels Feb 1, 2022
@felix-hilden
Copy link
Collaborator

This is indeed the case, and is already tracked in #567 so I'll close this as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: strings Related to our handling of strings R: duplicate This issue or pull request already exists T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants