Turn existing formatted strings into f-strings#3186
Merged
karlhigley merged 2 commits intoOpenMined:masterfrom Mar 13, 2020
Merged
Turn existing formatted strings into f-strings#3186karlhigley merged 2 commits intoOpenMined:masterfrom
karlhigley merged 2 commits intoOpenMined:masterfrom
Conversation
karlhigley
reviewed
Mar 12, 2020
| types: [python] | ||
| language: python | ||
| additional_dependencies: | ||
| - flynt |
Contributor
There was a problem hiding this comment.
Does this need to be added to the dependencies files?
Member
Author
There was a problem hiding this comment.
Not for the pre-commit to work - it will install it automatically if needed - but perhaps it would simplify things to add flynt to dev dependencies anyway. Will do that in a bit
karlhigley
approved these changes
Mar 12, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
flynt, to turn formatted strings which already exist in the codebase to f-stringsflyntto pre-commitf-strings are quicker than other types of formatting strings.
I can remove the pre-commit addition if needed. It may not be worth the additional overhead of running pre-commit so long as non-f strings in new PRs are caught in review.
There is no existing issue relating to this PR.
To test: