ruff
6341bb74 - [ty] Treat `Callable` dunder members as bound method descriptors (#20860)

Commit
57 days ago
[ty] Treat `Callable` dunder members as bound method descriptors (#20860) ## Summary Dunder methods (at least the ones defined in the standard library) always take an instance of the class as the first parameter. So it seems reasonable to generally treat them as bound method descriptors if they are defined via a `Callable` type. This removes just a few false positives from the ecosystem, but solves three user-reported issues: closes https://github.com/astral-sh/ty/issues/908 closes https://github.com/astral-sh/ty/issues/1143 closes https://github.com/astral-sh/ty/issues/1209 In addition to the change here, I also considered [making `ClassVar`s bound method descriptors](https://github.com/astral-sh/ruff/pull/20861). However, there was zero ecosystem impact. So I think we can also close https://github.com/astral-sh/ty/issues/491 with this PR. closes https://github.com/astral-sh/ty/issues/491 ## Test Plan Added regression test
Author
Parents
Loading