Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make joins of callables respect positional parameter names #4920
This commit fixes #2777 -- specifically, it enhances joining callables to erase the names of positional arguments as necessary.
For example, consider the following program:
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
This commit does not attempt change how handle keyword-only arguments are currently handled.
A couple small doc nits but I think this looks good.
I'm being kind of picky about the docs partially because this kind of code (meets and joins in particular) always takes me a while to remember enough context for, which is a shame because they are underdocumented in every language implementation I've ever worked on ;)
(I also can never remember which is meet and which is join without looking it up. It just never sticks. I don't know why.)