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

Incorrect fix for "%s" % "\n" #126

Closed
wolfgangl opened this issue Sep 10, 2020 · 1 comment
Closed

Incorrect fix for "%s" % "\n" #126

wolfgangl opened this issue Sep 10, 2020 · 1 comment

Comments

@wolfgangl
Copy link

wolfgangl commented Sep 10, 2020

Please see example below:

echo '"%s" % "\n"' > test.py

python -m  fixit.cli.apply_fix test.py

Scanning 1 files
test.py

Encountered exception <class 'Exception'> for the following paths:
test.py
Running `pyre start` may solve the issue.
test.py:1:1 [applied fix]
    UseFstringRule: Do not use printf style formatting or .format(). Use f-string instead to be more
    readable and efficient. See https://fburl.com/usefstring.
Encountered exception <class 'Exception'> for the following paths:
test.py
test.py
test.py
Running `pyre start` may solve the issue.
All done! ✨ 🍰 ✨
1 file left unchanged.

Found 1 reports in 1 files in 0.33 seconds.


cat test.py 
f"{'\n'}"


python test.py 
  File "test.py", line 1
    f"{'\n'}"
    ^
SyntaxError: f-string expression part cannot include a backslash
@amyreese
Copy link
Member

Hey folks, we just released Fixit 2.0, which includes major changes to the core frameworks, linting engine, API, and CLI. In light of this new release, this issue is likely to be resolved or no longer relevant. Please take a look at the new user guide or the upgrade guide for more information on how to migrate your projects to the new version.

If you believe this issue is still relevant or still occurring in the latest version, please feel free to open a new issue, or reply here with more details.

Thank you!

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

2 participants