Merged
Conversation
Not super glamorous, but updated the codebase to take advantage of
Python 3.11 syntax.
Things like:
- explicit `object` subclass
- f-string syntax
- `yield from`
- `set()` => `{}`
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Run `pyupgrade` first so that any other lint checks have to pass on the reformatted code. Found a couple of stragglers in the root directory as well. Signed-off-by: Mike Fiedler <miketheman@gmail.com>
di
approved these changes
Dec 20, 2022
Comment on lines
-951
to
+952
| "The user '{0}' isn't allowed to upload to project '{1}'. " | ||
| "See {2} for more information." | ||
| "The user '{}' isn't allowed to upload to project '{}'. " | ||
| "See {} for more information." |
Member
There was a problem hiding this comment.
Should this become an f-string? I'm surprised it didn't catch this use of .format.
Member
Author
There was a problem hiding this comment.
I suspect it has something to do with the complex usage of request.help_url(_anchor="project-name"), and quotations - there's a test that shows this should be a noop:
https://github.com/asottile/pyupgrade/blob/ff43f9a6ab4c37d0a89a4bb5ae338c2d0233b5eb/tests/features/fstrings_test.py#L34-L37
Comment on lines
+964
to
+965
| "The given token isn't allowed to upload to project '{}'. " | ||
| "See {} for more information." |
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.
Not super glamorous, but updated the codebase to take advantage of Python 3.11 syntax.
Things like:
objectsubclassyield fromset()=>{}Signed-off-by: Mike Fiedler miketheman@gmail.com