-
-
Notifications
You must be signed in to change notification settings - Fork 3k
ruff: add pyupgrade #16023
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
ruff: add pyupgrade #16023
Conversation
This comment has been minimized.
This comment has been minimized.
This reverts commit 56a82e9.
This comment has been minimized.
This comment has been minimized.
Turns out the one UP037 exemption already came up before: @ichard26 is there an existing issue for this? |
There might be an issue somewhere, but honestly it seems fine to include in mypyc/mypyc#988. |
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
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.
Thanks!
@@ -329,7 +334,7 @@ def get_prefix(file_read: str, name: str) -> str: | |||
else: | |||
module_name_str = name | |||
|
|||
return f"{file_read}: [{module_name_str}]: " |
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.
What's the purpose of the change to this line?
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.
Before it was print("%sfoobar" % prefix)
, now it's print(prefix, "foobar")
hence removed the space.
For example, this review comment could've been spared with UP036.