mirror of https://github.com/astral-sh/ruff
## Summary Fixes https://github.com/astral-sh/ty/issues/1571. I realised I was overcomplicating things when I described what we should do in that issue description. The simplest thing to do here is just to special-case call expressions and short-circuit the call-binding machinery entirely if we see it's `NotImplemented` being called. It doesn't really matter if the subdiagnostic doesn't fire when a union is called and one element of the union is `NotImplemented` -- the subdiagnostic doesn't need to be exhaustive; it's just to help people in some common cases. ## Test Plan Added snapshots |
||
|---|---|---|
| .. | ||
| annotation.md | ||
| builtins.md | ||
| callable_instance.md | ||
| callables_as_descriptors.md | ||
| constructor.md | ||
| dunder.md | ||
| dunder_import.md | ||
| function.md | ||
| getattr_static.md | ||
| invalid_syntax.md | ||
| methods.md | ||
| never.md | ||
| open.md | ||
| overloads.md | ||
| replace.md | ||
| str_startswith.md | ||
| subclass_of.md | ||
| union.md | ||