ruff/crates/red_knot_python_semantic/resources/mdtest/call
Shunsuke Shibayama 78b5f0b165
[red-knot] detect invalid return type (#16540)
## Summary

This PR closes #16248.

If the return type of the function isn't assignable to the one
specified, an `invalid-return-type` error occurs.
I thought it would be better to report this as a different kind of error
than the `invalid-assignment` error, so I defined this as a new error.

## Test Plan

All type inconsistencies in the test cases have been replaced with
appropriate ones.

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
2025-03-12 01:58:59 +00:00
..
builtins.md [red-knot] Support multiple overloads when binding parameters at call sites (#16568) 2025-03-11 15:08:17 -04:00
callable_instance.md [red-knot] detect invalid return type (#16540) 2025-03-12 01:58:59 +00:00
constructor.md [red-knot] Format mdtest Python snippets more concisely (#13905) 2024-10-24 11:09:31 +00:00
dunder.md [red-knot] detect invalid return type (#16540) 2025-03-12 01:58:59 +00:00
function.md [red-knot] detect invalid return type (#16540) 2025-03-12 01:58:59 +00:00
getattr_static.md [red-knot] Attribute access and the descriptor protocol (#16416) 2025-03-07 22:03:28 +01:00
invalid_syntax.md [red-knot] add call checking (#15200) 2025-01-07 20:39:45 +00:00
methods.md [red-knot] Support multiple overloads when binding parameters at call sites (#16568) 2025-03-11 15:08:17 -04:00
never.md [red-knot] Never is callable and iterable. Arbitrary attributes can be accessed. (#16533) 2025-03-06 15:59:19 +00:00
subclass_of.md [red-knot] Add support for calling type[…] (#16597) 2025-03-10 13:24:13 +01:00
union.md [red-knot] detect invalid return type (#16540) 2025-03-12 01:58:59 +00:00