This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Closed
Conversation
cburgdorf
reviewed
Sep 26, 2019
| return getattr(module, class_name) | ||
| except AttributeError: | ||
| msg = 'Module "%s" does not define a "%s" attribute/class' % ( | ||
| msg = 'Module "{}" does not define a "{}" attribute/class'.format( |
Contributor
There was a problem hiding this comment.
I guess this could become an f-string, too?
cburgdorf
reviewed
Sep 26, 2019
| except AttributeError: | ||
| raise ImportError( | ||
| "Unable to derive appropriate import path for {0}".format( | ||
| "Unable to derive appropriate import path for {}".format( |
Contributor
There was a problem hiding this comment.
This could also become an f-string
cburgdorf
reviewed
Sep 26, 2019
| if value < 0: | ||
| raise ValueError( | ||
| "Value cannot be negative: Got: {0}".format( | ||
| "Value cannot be negative: Got: {}".format( |
Contributor
There was a problem hiding this comment.
All of the above could become f-strings
cburgdorf
reviewed
Sep 26, 2019
| public_key = signature.recover_public_key_from_msg(message) | ||
| except BadSignature as e: | ||
| raise ValidationError("Bad Signature: {0}".format(str(e))) | ||
| raise ValidationError("Bad Signature: {}".format(str(e))) |
Contributor
There was a problem hiding this comment.
This could also become an f-string
cburgdorf
reviewed
Sep 26, 2019
Contributor
cburgdorf
left a comment
There was a problem hiding this comment.
Nice cleanup! There are still a lot of places that could become f-strings. I commented some of them. Not sure how py-ugrade decides when to automatically turn things into f-string or not but as you are already on it, mind changing the missing ones?
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What was wrong?
Fixes #1814
How was it fixed?
Run pyupgrade against the repo
To-Do
Cute Animal Picture