-
Notifications
You must be signed in to change notification settings - Fork 152
ENH: Add some type annotations to play nicely with mypy #269
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
Conversation
I assume you've verified that this change resolves your issue? |
Yes, I have tested it and mypy no longer complains. It could be also possible to add tests to check the compatibility in the future. |
If it's easy to set up a mypy check in tox, feel free to propose it. I would be happy to include it in this PR or to merge this and have the mypy checks in a future PR. |
Im a bit busy at the moment but would be happy to give it a try. |
If you check tox, we style check two generated files. Probably makes the most sense to test just those. |
It seems that setuptools is lazy with type hints, so the verioneer.py file causes issues. |
Should work like this, if wanted I can already start a Release 0.21 section in the NEWS.md and add this |
Any idea why the setup fails? |
mypy does not seem to install on pypy (python/typed_ast#111). I don't know if Tox will allow us to skip certain dependencies and test steps. Feel free to look into it, or I can try to find time this weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think I found the trick...
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Fix for #268
Simply add type hints to
LONG_VERSION_PY
(use typing classes to support python<3.9)