We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from typing import Literal x: Literal[-True] = -1
results in
main.py:3: error: Incompatible types in assignment (expression has type "Literal[-1]", variable has type "Literal[-1]") [assignment]
https://mypy-play.net/?mypy=latest&python=3.10&gist=3e6413c5ba1b82c11ff2ae6b66abd03e
Instead mypy should reject the type declaration.
The text was updated successfully, but these errors were encountered:
Allow unary + in Literal
95f974e
Implements python/typing#1550 Fixes python#16727 (a trivial bug I found while implementing this feature)
Allow unary + in Literal (#16729)
f9e8e0b
Implements python/typing#1550 Fixes #16727 (a trivial bug I found while implementing this feature)
Successfully merging a pull request may close this issue.
results in
https://mypy-play.net/?mypy=latest&python=3.10&gist=3e6413c5ba1b82c11ff2ae6b66abd03e
Instead mypy should reject the type declaration.
The text was updated successfully, but these errors were encountered: