KEMBAR78
Can't create a type alias targeting None · Issue #3269 · python/mypy · GitHub
Skip to content

Can't create a type alias targeting None #3269

@JukkaL

Description

@JukkaL

An alias that refers to None doesn't work:

N = type(None)
NN = None
n: N  # Invalid type "t.N"
nn: NN  # Invalid type "t.NN"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions