Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union types: Support narrowing to Ellipsis (...) cases of Unions #13157

Merged
merged 1 commit into from
Jul 17, 2022

Commits on Jul 17, 2022

  1. 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>
    László Vaskó and csernazs committed Jul 17, 2022
    Configuration menu
    Copy the full SHA
    6ea100d View commit details
    Browse the repository at this point in the history