-
Notifications
You must be signed in to change notification settings - Fork 952
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
Would you be interested in a PR adding type hints? #362
Comments
Yes, that's interesting! As long as it does not break anything; I am not sure if type hints are supported by Python3.4. Some additional thoughts:
|
Python 3.4 does not support inline type annotations, so the valid syntax would be annoyingly verbose (and non-standard). But why do you guys even support it? I think it's not that common anymore |
I also think that very few people use that. It is much easier to upgrade from python 3.4 than it was from e.g. 2.7. Let me check with other contributors to see what they think. |
@pietermarsman Did you get any response from other contributors? In my view I think it's fine to drop python 3.4 support, and type hints would be nice. The only drawback is it might be a slight blocker for other people contributing if they don't know how to use them. @Recursing I appreciate it's been a long time, but we're currently trying to sort through all the open issues. Is this something you'd still be interested in helping with? |
They don't need to be mandatory. I think they would definitely help more than harm
Sure |
Not that I remember. I like type annotations so I am pro :) |
I also like them so I vote yes |
When we add this, we should also add mypy to the travis-ci test run. I just ran it locally, and there are only 8 issues. This surprised me a bit, but maybe its because we dont have type annotations yet. With mypy the type annotations add more value because we detect wrong usage of types earlier. |
Agreed. Potentially also worth adding pytype as the two tools check different things |
I also wanted to add mypy to a work-related project, but after you suggested pytype I did a little research into that. And now I actually prefer pytype over mypy because of two benefits:
See this presentation (by creator of pytype) |
Yeah, I agree it's good. However, there are some things that mypy catches that pytype won't, so using both is a valid option. |
Lets leave it up to the one who implements it then :p I've moved this to accepted. |
Wouldn't it be best to add the stubs in https://github.com/python/typeshed? |
Closed by #661 |
I think type hints would help users and new contributors
The text was updated successfully, but these errors were encountered: