mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 14:00:51 -05:00
This updates the `Signature` and `CallBinding` machinery to support multiple overloads for a callable. This is currently only used for `KnownFunction`s that we special-case in our type inference code. It does **_not_** yet update the semantic index builder to handle `@overload` decorators and construct a multi-signature `Overloads` instance for real Python functions. While I was here, I updated many of the `try_call` special cases to use signatures (possibly overloaded ones now) and `bind_call` to check parameter lists. We still need some of the mutator methods on `OverloadBinding` for the special cases where we need to update return types based on some Rust code.
Markdown files within the mdtest/ subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs integration test.
See crates/red_knot_test/README.md for documentation of this test format.