-
Notifications
You must be signed in to change notification settings - Fork 24
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
Requesting typeshed stub #26
Comments
Great idea! If you had the time to contribute something like that I would definitely be interested. |
Just a drive-by comment: wouldn’t it be better to add type hints directly to the code here? typeshed stubs are only solution in emergency for libraries which are unmaintained or unwilling to add typehints to the code proper. |
Type annotations are different between Python 2 and Python 3, otherwise I wouldn't mind adding the annotations and submitting a PR. @kquick - Since Python 2 is EOL, would you allow the codebase to evolve to be only Python 3 compliant? Any plans or objections to a migration? |
@todd-cook I think it's reasonable to finally drop Python 2 support, so I have no objections to a migration. |
I would also be open to type hints directly in the code, per @mcepl 's comment. |
You know you can make in-line type hints Python 2 compatible: https://gitlab.com/m2crypto/m2crypto/-/blob/master/M2Crypto/BN.py (https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code) |
That's convenient, but I'd actually prefer the direct inline annotations and dropping Python 2 support to the |
It'd be great to have a typeshed stub for enhanced build-time correctness validation with mypy, pyre-check, and the like.
The text was updated successfully, but these errors were encountered: