ruff/crates/ruff_linter
Darius Carrier b9b094869a
[pylint] Fix false positives, add missing methods, and support positional-only parameters (PLE0302) (#16263)
## Summary

Resolves 3/4 requests in #16217:

-  Remove not special methods: `__cmp__`, `__div__`, `__nonzero__`, and
`__unicode__`.
-  Add special methods: `__next__`, `__buffer__`, `__class_getitem__`,
`__mro_entries__`, `__release_buffer__`, and `__subclasshook__`.
-  Support positional-only arguments.
-  Add support for module functions `__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

- Manually confirmed each example file from the issue functioned as
expected.
- Ran cargo nextest to ensure `unexpected_special_method_signature` test
still passed.

Fixes #16217.
2025-02-21 08:38:51 -05:00
..
resources [pylint] Fix false positives, add missing methods, and support positional-only parameters (PLE0302) (#16263) 2025-02-21 08:38:51 -05:00
src [pylint] Fix false positives, add missing methods, and support positional-only parameters (PLE0302) (#16263) 2025-02-21 08:38:51 -05:00
Cargo.toml Bump version to 0.9.7 (#16271) 2025-02-20 08:12:11 -05:00