Skip to content
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

Merged
merged 8 commits into from
Sep 3, 2023
Merged

ruff: add pyupgrade #16023

merged 8 commits into from
Sep 3, 2023

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented Sep 2, 2023

For example, this review comment could've been spared with UP036.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@ikonst
Copy link
Contributor Author

ikonst commented Sep 3, 2023

Turns out the one UP037 exemption already came up before:
#15575 (comment)

@ichard26 is there an existing issue for this?

@ichard26
Copy link
Collaborator

ichard26 commented Sep 3, 2023

@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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hauntsaninja hauntsaninja merged commit f83d6eb into python:master Sep 3, 2023
18 checks passed
@@ -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}]: "
Copy link
Member

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?

Copy link
Contributor Author

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.

@ikonst ikonst deleted the 09-02-pyupgrade branch September 3, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants