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

Treat None and NoneType as identical for typing #1624

Closed
jakebailey opened this issue Oct 4, 2019 · 0 comments · Fixed by #1626

Comments

@jakebailey
Copy link
Member

commented Oct 4, 2019

Splitting out from #1622.

Something like Tuple[None, None, None] is valid. However, None is an instance of NoneType, and not a type, so gets filtered out from our [] handling, making that tuple type evaluate to Tuple[Unknown].

The typing docs say:

Note that None as a type hint is a special case and is replaced by type(None)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.