-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
3.6 stubs used even though interpreter is 3.5 #3250
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
Comments
I can't reproduce this with mypy master. What mypy version are you using? |
mypy --version |
Just tried this on master with Python 3.4 and I cannot reproduce. This code from click import core
core.BaseCommand('test') passes mypy without errors. @daviskirk Could you please try to reproduce your error on current GitHub master? |
My suspicion is that the OP somehow manually added lib/mypy/typeshed/third_party/3.6 to their MYPYPATH. That's not supported and I'm just going to close this. Also, IIRC @ambv owns the click stubs. |
Cannot reproduce either. The point of putting Click in 3.6 was that those were our first stubs that used variable annotations and at that point Mypy only enabled parsing this syntax if the corresponding Python version matched. It's since fixed so I think we could move Click stubs to |
If you want that to happen either submit a PR or an issue to typeshed. |
In case anyone ends up here with the same problem. |
That explains the syntax error; the old parser wasn't updated to support PEP 526 syntax. Do you specify in your configuration to use |
No I don't ... ok so that should explain everything, thanks for the explanation! |
The 3rd party click package defines its stubs as lib/mypy/typeshed/third_party/3.6/click/core.pyi . However, when using python 3.5 it still tries to read the stubs resulting in a
error: Parse error before :
because of the 3.6 syntax used.Is there a way to exclude the inclusion of 3.6 stubs?
The text was updated successfully, but these errors were encountered: