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

Fix incorrect f-string tokenization #4332

Merged
merged 8 commits into from Apr 25, 2024
Merged

Conversation

JelleZijlstra
Copy link
Collaborator

Fixes #4329

I didn't understand how the f-string state machine worked, so I made the state more explicit and now it seems to work. I'll want to try it on more real-world code before merging this though.

@tusharsadhwani
Copy link
Contributor

Very clean!

Copy link

github-actions bot commented Apr 25, 2024

diff-shades reports zero changes comparing this PR (440009e) to main (ba88fc3).


What is this? | Workflow run | diff-shades documentation

@JelleZijlstra
Copy link
Collaborator Author

@hauntsaninja would you mind trying this branch on your codebase to see if there are any crashes or reformattings?

I tried on my company codebase, on pyomo (where the bug report came from), and on a venv full of packages and found no issues.

@tusharsadhwani
Copy link
Contributor

tusharsadhwani commented Apr 25, 2024

My workplace runs black for a lot of our customers, I will deploy the next release to catch any missing cases as well.

@hauntsaninja
Copy link
Collaborator

(no issues on my work codebase)

@JelleZijlstra
Copy link
Collaborator Author

Great, thanks! @tusharsadhwani or @hauntsaninja do you think you have time to do a review?

If not, I'll merge this PR tonight my time and cut a new release.

Copy link
Contributor

@tusharsadhwani tusharsadhwani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfectly good to me. Appreciate the documentation as well!

@JelleZijlstra JelleZijlstra merged commit e4aaa8a into psf:main Apr 25, 2024
46 checks passed
@JelleZijlstra JelleZijlstra deleted the fix4329 branch April 25, 2024 23:45
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

Successfully merging this pull request may close these issues.

Black cannot parse previously parseable file in 24.4.1
3 participants