-
Notifications
You must be signed in to change notification settings - Fork 248
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
Apply ruff/pyupgrade rules (UP) #786
Conversation
251929a
to
434fdb5
Compare
d313f80
to
ee69be5
Compare
24efab4
to
c0522ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
src/packaging/tags.py
Outdated
yield "macosx_{major}_{minor}_{binary_format}".format( | ||
major=major_version, minor=0, binary_format=binary_format | ||
) | ||
yield f"macosx_{major_version}_0_{binary_format}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
e7b3222
to
95cefbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine w/ the changes if @pradyunsg is.
686766c
to
59be934
Compare
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
Thanks! |
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/