-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
bool |= bool
complains about incompatible assignment type
#1793
Comments
This sounds reasonable (if slightly unfortunate). Presumably you'll need the same change in the Python 2 stubs. |
yep -- I had that patch for python2 as well (just showed the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From python/mypy#4386
I couldn't find any definitive specification on this other than PEP 285
Here's the input program (which I expect to cause no linting errors)
However it results in the following:
It seems that PEP 285 is implemented faithfully in the versions of python I was able to check:
This patch to typeshed makes the above pass:
though I'm concerned about the
# type: ignore
(bool
does after all violate LSP ala python/mypy#1237 so maybe this is correct?)If this seems OK, I'll turn it into a PR :)
The text was updated successfully, but these errors were encountered: