-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add flynt package to linter for updating format strings #74
Conversation
This is a draft PR because we are waiting on Flynt being added to conda-forge. @xylar and I made a merge request there, and it's waiting for review. This PR depends on those changes being accepted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just waiting on:
conda-forge/staged-recipes#22931
rev: '0.78' | ||
hooks: | ||
- id: flynt | ||
args: ["--fail-on-change", "--verbose"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed, this is a great starting point. We'll play with these flags as we get more experience.
This will convert format strings to f strings when possible
06d08d2
to
5722bae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving based on an inspection of the changes (assuming the CI tests pass).
Flynt is a package that automatically converts older-style formatting strings to f-strings. I've added this to pre-commit so that any incoming changes will use f-strings by default.
Checklist
api.md
) has any new or modified class, method and/or functions listed