ENH: Add some type annotations to play nicely with mypy#269
ENH: Add some type annotations to play nicely with mypy#269effigies merged 4 commits intopython-versioneer:masterpython-versioneer/python-versioneer:masterfrom
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. |
effigies
left a comment
There was a problem hiding this comment.
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)