Currently we have Definitions for function parameters (that is, inside the function body we know that those names are defined), but we only infer @Todo types for those names, even if the parameter has a type annotation.
The tricky part of implementing this inference correctly is that we have to handle PEP 695 generic type parameter scopes, e.g. def f[T](x: T): ... has a special implicit scope in between the containing scope and the function's body scope, in which T is defined. So for generic functions we have to do inference of the parameter type annotations in that scope, not in the outer scope.
Currently we have Definitions for function parameters (that is, inside the function body we know that those names are defined), but we only infer
@Todotypes for those names, even if the parameter has a type annotation.The tricky part of implementing this inference correctly is that we have to handle PEP 695 generic type parameter scopes, e.g.
def f[T](x: T): ...has a special implicit scope in between the containing scope and the function's body scope, in whichTis defined. So for generic functions we have to do inference of the parameter type annotations in that scope, not in the outer scope.