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

Implement PLE0206 #1005

Merged
merged 4 commits into from
Dec 3, 2022
Merged

Implement PLE0206 #1005

merged 4 commits into from
Dec 3, 2022

Conversation

harupy
Copy link
Contributor

@harupy harupy commented Dec 3, 2022

if decorator_list.iter().any(|d| match &d.node {
ExprKind::Name { id, .. } if id == "property" => true,
_ => false,
}) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe also check checker.is_builtin(property)?

@charliermarsh
Copy link
Member

Rock! Nice work.

@charliermarsh charliermarsh merged commit 31a3314 into astral-sh:main Dec 3, 2022
@charliermarsh
Copy link
Member

Oh wait, I think this should be PLR0206? Since it's a "refactor" rule?

@harupy
Copy link
Contributor Author

harupy commented Dec 3, 2022

@charliermarsh I misunderstood the naming rule. Yes, it should be PLR0206.

@charliermarsh
Copy link
Member

@harupy - Sorry, I wasn't super clear. What do you think of that convention? I wanted to preserve the R0206 part to match Pylint.

@harupy
Copy link
Contributor Author

harupy commented Dec 3, 2022

That convention sounds good to me :) If we use PLE, W1301 and E1301 would conflict.

@charliermarsh
Copy link
Member

Oh hah, true!

@charliermarsh
Copy link
Member

I'll rename this check and push it straight to main.

@charliermarsh
Copy link
Member

Oh nm! Thank you!

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