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

transform-concats creates unnecessary f-strings #187

Open
mwtoews opened this issue Jul 24, 2023 · 0 comments
Open

transform-concats creates unnecessary f-strings #187

mwtoews opened this issue Jul 24, 2023 · 0 comments

Comments

@mwtoews
Copy link

mwtoews commented Jul 24, 2023

Take an example res = "here" + r"\there", the diff from flynt -tc is:

1c1
< res = "here" + r"\there"
---
> res = f"here\\there"

while this isn't an error, it is surprisingly transformed to a f-string with nothing to format.

An expected result would be either:

res = "here\\there"
# or
res = r"here\there"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant