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

add the "__prepare__" method to the list of recognized dunder method #9529

Conversation

takaya0
Copy link
Contributor

@takaya0 takaya0 commented Jan 15, 2024

Summary

Closes #9508 .
Add __prepare__ method to dunder method list in is_known_dunder_method.

Test Plan

  1. add "prepare" method to Apple class in crates/ruff_linter/resources/test/fixtures/pylint/bad_dunder_method_name.py.
  2. run cargo test

@charliermarsh charliermarsh added the bug Something isn't working label Jan 15, 2024
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh enabled auto-merge (squash) January 15, 2024 14:35
@charliermarsh charliermarsh merged commit 0753968 into astral-sh:main Jan 15, 2024
16 checks passed
Copy link

codspeed-hq bot commented Jan 15, 2024

CodSpeed Performance Report

Merging #9529 will improve performances by 4.55%

Comparing takaya0:PLW3201-add-prepare-to-known-dunder-method (98a9db3) with main (66804ec)

Summary

⚡ 1 improvements
✅ 29 untouched benchmarks

Benchmarks breakdown

Benchmark main takaya0:PLW3201-add-prepare-to-known-dunder-method Change
parser[numpy/ctypeslib.py] 12.8 ms 12.2 ms +4.55%

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No __prepare__ at is_known_dunder_method
2 participants