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

Update ruff to 0.6.9 #17940

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Update ruff to 0.6.9 #17940

merged 3 commits into from
Oct 14, 2024

Conversation

cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Oct 14, 2024

@cdce8p cdce8p changed the title Update ruff 0.6.9 Update ruff to 0.6.9 Oct 14, 2024
Copy link
Contributor

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

@@ -160,7 +160,7 @@ def replacement_map_from_symbol_table(
):
new_node = new[name]
if (
type(new_node.node) == type(node.node) # noqa: E721
type(new_node.node) == type(node.node)
Copy link
Member

Choose a reason for hiding this comment

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

Should this use is instead of ==?

Copy link
Collaborator Author

@cdce8p cdce8p Oct 14, 2024

Choose a reason for hiding this comment

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

We could although I'm uncertain how mypyc optimizes that and thus what the performance impact would be. That's why I chose to add E721 to the ignore list. There are three more instances which ruff would have suggested to change.

@JelleZijlstra JelleZijlstra merged commit 5fba078 into python:master Oct 14, 2024
18 checks passed
@cdce8p cdce8p deleted the update-ruff-0.6.9 branch October 14, 2024 13:19
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.

2 participants