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

Refactoring f strings and escaped chars in strings #213

Closed
oserban opened this issue Mar 23, 2022 · 2 comments
Closed

Refactoring f strings and escaped chars in strings #213

oserban opened this issue Mar 23, 2022 · 2 comments
Assignees
Labels
bug Something isn't working next release This will be fixed in next release

Comments

@oserban
Copy link

oserban commented Mar 23, 2022

Issue description or question

When having f strings without any substitutions sourcery recommends converting into string. While the suggestion is good, the resulting conversion is not always good, especially if you are using escaped chars in strings:

Example:

print(f"Hello\tworld")

will result into after conversion:

print("Hello\\tworld")

Sourcery Version

0.11.1

Code editor or IDE name and version

Pycharm 2021.3.3

OS name and version

OSX

@Hellebore Hellebore added the bug Something isn't working label Mar 23, 2022
@Hellebore
Copy link
Collaborator

Thanks for raising - definitely an issue!

@bm424 bm424 self-assigned this Apr 4, 2022
@bm424 bm424 closed this as completed Apr 4, 2022
@bm424 bm424 added the next release This will be fixed in next release label Apr 4, 2022
@bm424
Copy link
Contributor

bm424 commented Apr 4, 2022

@oserban This issue shouldn't arise as of the next release of Sourcery (11.3). Let us know if it persists after that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next release This will be fixed in next release
Projects
None yet
Development

No branches or pull requests

3 participants