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

Add flynt package to linter #186

Merged
merged 1 commit into from
Jul 27, 2024
Merged

Conversation

altheaden
Copy link
Collaborator

I'm updating the linting procedure to include flynt, which is a package that automatically searches for and replaces older-style format strings with f-strings (in most cases). This is a change we made a while ago in polaris (E3SM-Project/polaris#74).

Checklist

  • Testing comment in the PR documents testing used to verify the changes

@altheaden altheaden added the dependencies Pull requests that update a dependency file label Jul 26, 2024
@altheaden
Copy link
Collaborator Author

Testing

I created the mache dev environment and verified that flynt was installed. Then, I created a python file with an old-style format string and ran pre-commit on that file, and it flagged and automatically fixed the format string as expected.

@altheaden altheaden requested a review from xylar July 26, 2024 21:28
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

@altheaden, looks great!

@xylar xylar self-assigned this Jul 27, 2024
@xylar xylar merged commit 1245ee3 into E3SM-Project:main Jul 27, 2024
6 checks passed
@xylar xylar deleted the flynt-to-linter branch July 27, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants