Apply ruff/pyupgrade rules (UP)#786
Merged
Merged
Conversation
DimitriPapadopoulos
force-pushed
the
UP
branch
2 times, most recently
from
March 12, 2024 22:08
251929a to
434fdb5
Compare
DimitriPapadopoulos
force-pushed
the
UP
branch
2 times, most recently
from
May 8, 2024 18:01
d313f80 to
ee69be5
Compare
DimitriPapadopoulos
force-pushed
the
UP
branch
3 times, most recently
from
May 8, 2024 18:28
24efab4 to
c0522ef
Compare
pradyunsg
reviewed
May 9, 2024
pradyunsg
left a comment
Member
There was a problem hiding this comment.
I don't think UP032 is a good rule to be enforcing as-is, at least not without changing the surrounding logic to keep it valid.
Comment on lines
+453
to
+450
| yield "macosx_{major}_{minor}_{binary_format}".format( | ||
| major=major_version, minor=0, binary_format=binary_format | ||
| ) | ||
| yield f"macosx_{major_version}_0_{binary_format}" |
DimitriPapadopoulos
force-pushed
the
UP
branch
3 times, most recently
from
May 10, 2024 19:41
e7b3222 to
95cefbe
Compare
brettcannon
approved these changes
Jul 4, 2024
brettcannon
left a comment
Member
There was a problem hiding this comment.
I'm fine w/ the changes if @pradyunsg is.
DimitriPapadopoulos
force-pushed
the
UP
branch
5 times, most recently
from
July 13, 2024 06:23
686766c to
59be934
Compare
pradyunsg
approved these changes
Jul 13, 2024
Member
Wow. |
UP030 Use implicit references for positional format fields
UP031 Use format specifiers instead of percent format
UP032 Use f-string instead of `format` call
Member
|
Thanks! |
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.
https://docs.astral.sh/ruff/rules/format-literals/
https://docs.astral.sh/ruff/rules/printf-string-formatting/
https://docs.astral.sh/ruff/rules/f-string/