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

no spaces are added around arithmetic operations inside fstrings #1135

Closed
radkujawa opened this issue Nov 4, 2019 · 2 comments
Closed

no spaces are added around arithmetic operations inside fstrings #1135

radkujawa opened this issue Nov 4, 2019 · 2 comments
Labels
T: bug Something isn't working

Comments

@radkujawa
Copy link

Steps to reproduce the behavior:

  1. Take this file:
a,b=0,1
s=f"{a+b}"
c=a+b
  1. Run Black on it
  2. Code is formatted like that:
a, b = 0, 1
s = f"{a+b}"
c = a + b

but I would expect:

a, b = 0, 1
s = f"{a + b}"
c = a + b
  • Version: black, version 19.3b0
  • OS and Python version: Linux/Python 3.7.4
@radkujawa radkujawa added the T: bug Something isn't working label Nov 4, 2019
@JelleZijlstra
Copy link
Collaborator

Yes, we don't currently do any formatting inside f-strings. This is essentially a duplicate of #567.

@radkujawa
Copy link
Author

OK, thanks for answer!
sorry to bother, didn't find #567.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants