mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-10 05:38:15 +00:00
![]() ## 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. |
||
---|---|---|
.. | ||
resources | ||
src | ||
Cargo.toml |