mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-18 10:35:09 +00:00
![]() ## Summary Fix some issues with subtying/assignability for instances vs callables. We need to look up dunders on the class, not the instance, and we should limit our logic here to delegating to the type of `__call__`, so it doesn't get out of sync with the calls we allow. Also, we were just entirely missing assignability handling for `__call__` implemented as anything other than a normal bound method (though we had it for subtyping.) A first step towards considering what else we want to change in https://github.com/astral-sh/ty/issues/491 ## Test Plan mdtests --------- Co-authored-by: med <medioqrity@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> |
||
---|---|---|
.. | ||
annotation.md | ||
builtins.md | ||
callable_instance.md | ||
constructor.md | ||
dunder.md | ||
function.md | ||
getattr_static.md | ||
invalid_syntax.md | ||
methods.md | ||
never.md | ||
str_startswith.md | ||
subclass_of.md | ||
union.md |