-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[pylint
] Fix false positives, add missing methods, and support positional-only parameters (PLE0302
)
#16263
Conversation
…args (PLE0302)
|
@ntBre do you want to take this one? |
Sure! |
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 for working on this! The code changes look right to me, but I think it would be great to paste in all of the examples from the issue and add their snapshot results just to make sure.
I definitely agree that the module functions are good to leave for a separate rule, so this will be perfect with a few more tests.
Thank you for the review! I have added the test cases along with the snapshots as requested. Side note, we are asserting |
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.
Nice, this looks great. Thanks again!
pylint
] Fix false positives, add missing methods, and support positional-only parameters (PLE0302
)
Summary
Resolves 3/4 requests in #16217:
__cmp__
,__div__
,__nonzero__
, and__unicode__
.__next__
,__buffer__
,__class_getitem__
,__mro_entries__
,__release_buffer__
, and__subclasshook__
.__dir__
and__getattr__
. As mentioned in the issue the check is scoped for methods rather than module functions. I am hesitant to expand the scope of this check without a discussion.Test Plan
unexpected_special_method_signature
test still passed.Fixes #16217.