-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make overload checks more strict when there are multiple 'Any's (#5254)
* Make overload checks more strict when there are multiple 'Any's Resolves #5250 This makes the "multiple overload matches due to Any" even more strict: we now return a non-Any type only if all of the return types are the same. * Make overlaps due to Any revert to using erased types if possible This change also modifies how mypy erases callables. Previously, callables of type 'Callable[[A, B, ...], R]' were erased to 'Callable[[], None]'. This change will now make the erasure be 'Callable[..., Any]', largely on the grounds that it seems more useful.
- Loading branch information
1 parent
01adcf4
commit a75fa88
Showing
4 changed files
with
111 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters