[pylint] Fix false positives, add missing methods, and support positional-only parameters (PLE0302) - #16263
Conversation
|
|
@ntBre do you want to take this one? |
|
Sure! |
ntBre
left a comment
There was a problem hiding this comment.
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 |
ntBre
left a comment
There was a problem hiding this comment.
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_signaturetest still passed.Fixes #16217.