forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Union types: Support narrowing to
Ellipsis
(...
) cases of Unions
After this change, narrowing to `Ellipsis` works similarly with regards to narrowing as `None` in `Optional`s It would be a good followup refactor to delegate some of the logic from `is_singleton_type` to the actual mypy types so they could decide for themselves if they are representing singleton objects Fixes: python#13117 Co-authored-by: Zsolt Cserna <cserna.zsolt@gmail.com>
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 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