-
Notifications
You must be signed in to change notification settings - Fork 29
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
Addition of unwanted whitespaces when a function is called within an expression section of an f-string #220
Comments
Thanks for reporting @enixmail. Which python version are you using? |
Python version 3.12.1 |
Thought that might be the case. We've had some issues trying to deal with how the tokenizer now presents us with f-strings. I'll try and get around to this soon |
Update: I had a go at fixing this when addressing #222 and it turns out to be extremely difficult to fix. Part of what makes it hard is that the spacing around the Anyway, that was probably TMI, but it's more for myself or Brice when we revisit this. In the meantime, I'm sorry, but you'll have to live with the spacing unfortunately. |
I'll have a go at this soon |
When a function is called within an expression section of an f-string,
snakefmt
will add unwanted whitespaces around the equal (=) sign when assigning a value to a named parameter and will also add a whitespace before a comma separating the parameters in that function call.Example code:
running snakefmt --diff will result in the following:
Note this was with
snakefmt
0.10.0 installed throughconda
, and the version of black that comes with it sees no problem with that file:The text was updated successfully, but these errors were encountered: