You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make joins of callables respect positional parameter names (#4920)
For example, consider the following program:
def f(x: int) -> int: ...
def g(y: int) -> int: ...
lst = [f, g]
Previously mypy would treat the final line as an error since 'f'
and 'g' have different types due to the different parameter names.
Now, mypy infers that `lst` has type `list[def (int) -> int]`,
effectively erasing the parameter name from the inferred type.
This commit does not attempt to handle keyword-only arguments.
Fixes#2777.
0 commit comments