You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
x=Truex|=False
However it results in the following:
$ mypy test.py
test.py:2: error: Incompatible types in assignment (expression has type "int", variable has type "bool")
$ pip freeze -l
mypy==0.560
psutil==5.4.2
typed-ast==1.1.0
It seems that PEP 285 is implemented faithfully in the versions of python I was able to check:
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: