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

Mypy 0.750 not compatible with Python 3.9 #38

Closed
thundergolfer opened this issue May 5, 2021 · 0 comments
Closed

Mypy 0.750 not compatible with Python 3.9 #38

thundergolfer opened this issue May 5, 2021 · 0 comments

Comments

@thundergolfer
Copy link
Collaborator

At time of writing, the README offers Mypy version 0.750 in it's demo code/config. It can be found that this version is not compatible with Python 3.9, producing a great number of "syntax error in type comment" errors when attempting to run a type-checking aspect or rule. See this issue: python/mypy#9916.

The investigation of this issue was done in the following reproduction repo: github.com/bogdan-lytvynov/bazel-mypy-integration-failed

If you clone that repo and attempt to run the integration using Python 3.9, with --test_output=all you will see the following kind of error lines:

/usr/local/lib/python3.9/site-packages/mypy/typeshed/stdlib/2and3/builtins.pyi:41: error: syntax error in type comment
/usr/local/lib/python3.9/site-packages/mypy/typeshed/stdlib/2and3/builtins.pyi:42: error: syntax error in type comment
/usr/local/lib/python3.9/site-packages/mypy/typeshed/stdlib/2and3/builtins.pyi:43: error: syntax error in type comment
/usr/local/lib/python3.9/site-packages/mypy/typeshed/stdlib/2and3/builtins.pyi:46: error: syntax error in type comment
...

To see that the error is not coming from the Bazel integration, I did python3 -m pip install mypy==0.750 and ran mypy print/print.py and got the same errors.


Action:

This is not a bug in the integration but I'll add a note in the README about it.

thundergolfer pushed a commit that referenced this issue May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant