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
…ions in return position (#18976)
* Fixes#17221.
* Fixes#17654.
* Fixes#17553.
* Fixes#17536.
* Fixes#16659.
* Fixes#16267.
* Fixes#15755.
* Fixes#15150.
* Fixes#14664.
* Incidentally improves error message in #12156.
* Fixes#12092.
* Fixes#11985.
* Improves #11455 (but the problem with union `TypeVar | SomeFixedType`
reported in comments there remains).
* Fixes#10426.
When using context, we can perform some overly optimistic inference when
return type is `T1 | T2`. This breaks in important case of
`builtins.min` when `default` and `key` are passed, essentially making
them always incompatible. This is not the most principled approach, but
let's see the primer results.
This resolves quite a few issues (some of them duplicates, but some -
substantially different), `min` problem was a very popular one... Diff
run: sterliakov/mypy-issues#30
https://mypy-play.net/?mypy=latest&python=3.10&gist=7c2af9e77a6246ee6fb3e5052722eec1
The text was updated successfully, but these errors were encountered: