ruff/crates/red_knot_python_semantic/resources/mdtest
Carl Meyer f2a86fcfda
[red-knot] add call checking (#15200)
## Summary

This implements checking of calls.

I ended up following Micha's original suggestion from back when the
signature representation was first introduced, and flattening it to a
single array of parameters. This turned out to be easier to manage,
because we can represent parameters using indices into that array, and
represent the bound argument types as an array of the same length.

Starred and double-starred arguments are still TODO; these won't be very
useful until we have generics.

The handling of diagnostics is just hacked into `return_ty_result`,
which was already inconsistent about whether it emitted diagnostics or
not; now it's even more inconsistent. This needs to be addressed, but
could be a follow-up.

The new benchmark errors here surface the need for intersection support
in `is_assignable_to`.

Fixes #14161.

## Test Plan

Added mdtests.
2025-01-07 20:39:45 +00:00
..
annotations [red-knot] Statically known branches (#15019) 2024-12-21 11:33:10 +01:00
assignment [red-knot] add call checking (#15200) 2025-01-07 20:39:45 +00:00
binary Don't special-case class instances in binary expression inference (#15161) 2025-01-06 13:50:20 -05:00
boolean [red-knot] Statically known branches (#15019) 2024-12-21 11:33:10 +01:00
call [red-knot] add call checking (#15200) 2025-01-07 20:39:45 +00:00
comparison [red-knot] More precise inference for chained boolean expressions (#15089) 2024-12-22 10:02:28 -08:00
conditional [red-knot] fix control flow for assignment expressions in elif tests (#15274) 2025-01-05 18:35:29 +00:00
declaration [red-knot] Avoid undeclared path when raising conflicting declarations (#14958) 2024-12-17 09:49:39 +05:30
exception [red-knot] Report invalid exceptions (#15042) 2024-12-18 18:31:24 +00:00
expression [red-knot] More precise inference for chained boolean expressions (#15089) 2024-12-22 10:02:28 -08:00
function [red-knot] function parameter types (#14802) 2024-12-06 12:55:56 -08:00
import Prioritize attribute in from/import statement (#15041) 2024-12-17 16:58:23 -05:00
literal [red-knot] Statically known branches (#15019) 2024-12-21 11:33:10 +01:00
loops [red-knot] Tests for 'while' loop boundness (#14944) 2024-12-12 21:06:56 +01:00
narrow [red-knot] add call checking (#15200) 2025-01-07 20:39:45 +00:00
regression [red-knot] Do not attach diagnostics to wrong file (#14337) 2024-11-14 15:39:51 +01:00
scopes Sync vendored typeshed stubs (#14977) 2024-12-15 01:02:41 +00:00
shadowing Test explicit shadowing involving defs (#15174) 2024-12-29 00:47:03 +00:00
stubs Allow assigning ellipsis literal as parameter default value (#14982) 2025-01-05 13:11:32 -06:00
subscript [red-knot] Statically known branches (#15019) 2024-12-21 11:33:10 +01:00
suppressions @no_type_check support (#15122) 2024-12-30 09:42:18 +00:00
type_of [red-knot] Eagerly normalize type[] types (#15272) 2025-01-07 12:53:07 +00:00
unary Don't special-case class instances in binary expression inference (#15161) 2025-01-06 13:50:20 -05:00
with [red-knot] Cleanup various todo_type!() messages (#15063) 2024-12-19 13:03:41 +00:00
.mdformat.toml [red-knot] have mdformat wrap mdtest files to 100 columns (#14020) 2024-10-31 21:00:51 +00:00
attributes.md [red-knot] Reduce TODOs in Type::member() (#15066) 2024-12-19 15:54:01 +00:00
final.md [red-knot] Add support for @final classes (#15070) 2024-12-19 21:02:14 +00:00
generics.md [red-knot] Add infrastructure to declare lints (#14873) 2024-12-10 16:14:44 +00:00
invalid_syntax.md [red-knot] Separate invalid syntax code snippets (#14803) 2024-12-06 02:41:33 +00:00
known_constants.md [red-knot] Support typing.TYPE_CHECKING (#14952) 2024-12-13 09:24:48 +00:00
mdtest_config.md Rename custom-typeshed-dir, target-version and current-directory CLI options (#14930) 2024-12-13 08:21:52 +00:00
metaclass.md [red-knot] Use type[Unknown] rather than Unknown as the fallback metaclass for invalid classes (#14961) 2024-12-13 19:48:51 +00:00
mro.md [red-knot] Add infrastructure to declare lints (#14873) 2024-12-10 16:14:44 +00:00
pep695_type_aliases.md [red-knot] mdtest: python version requirements (#14954) 2024-12-13 10:40:38 +01:00
slots.md Don't special-case class instances in binary expression inference (#15161) 2025-01-06 13:50:20 -05:00
statically_known_branches.md [red-knot] Statically known branches (#15019) 2024-12-21 11:33:10 +01:00
sys_platform.md [red-knot] Statically known branches (#15019) 2024-12-21 11:33:10 +01:00
sys_version_info.md Rename custom-typeshed-dir, target-version and current-directory CLI options (#14930) 2024-12-13 08:21:52 +00:00
unpacking.md [red-knot] Add diagnostic for invalid unpacking (#15086) 2024-12-30 13:10:29 +05:30