From 2614be36ccdb974b0c21b2efed80cadb03002c09 Mon Sep 17 00:00:00 2001 From: Douglas Creager Date: Mon, 15 Dec 2025 11:19:27 -0500 Subject: [PATCH] add note about paramspec overloads --- crates/ty_python_semantic/src/types/signatures.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ty_python_semantic/src/types/signatures.rs b/crates/ty_python_semantic/src/types/signatures.rs index 42cf93775d..ba37bd2f9a 100644 --- a/crates/ty_python_semantic/src/types/signatures.rs +++ b/crates/ty_python_semantic/src/types/signatures.rs @@ -387,6 +387,11 @@ impl<'db> CallableSignature<'db> { // the other callable's signature. We also need to compare the return types — for // instance, to verify in `Callable[P, int]` that the return type is assignable to // `int`, or in `Callable[P, T]` to bind `T` to the return type of the other callable. + // + // TODO: This logic might need to move down into `Signature`, if we need paramspecs to + // be able to match a _subset_ of an overloaded callable. (In that case, we need to + // check each signature individually, and combine together the ones that match into the + // overloaded callable that the paramspec binds to.) match (self_is_single_paramspec, other_is_single_paramspec) { ( Some((self_bound_typevar, self_return_type)),