8000 Union not being recognized as types.UnionType · Issue #13810 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content
Union not being recognized as types.UnionType #13810
Closed
@nickeldan

Description

@nickeldan

In this example,

Foo = str | int
reveal_type(Foo)

mypy (0.990, Python 3.10.6) reveals the type as builtins.object. It should be recognized as types.UnionType (new in Python 3.10).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-pep-604PEP 604 (union | operator)topic-runtime-semanticsmypy doesn't model runtime semantics correctly

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0