Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPython type hints #312
Python type hints #312
Comments
|
I'm all up for this. Is there any way to add tests for something like this? |
|
You can run mypy against the code and it will tell you if your types don't make sense. |
|
I'm happy to give it a try, and hopefully include mypy to travis config |
|
Opend PR #344 |
|
@jacopofar hello, in |
|
I see, the library supports Python 2 as well and so the parameter type has to be more flexible. Considering also the problem of the argument changing name, I think the added value of type hinting in this case is not worth it |


PEP 484 and PEP 526 introduced the concept of "type hints" which allow Python code to have inline type declarations to make it easier for editors and static analysis tools to work with Python code.
To maintain Python 2.7 compatibility, we'd have to use the comment-based syntax:
Is this something that might be worthwhile for us to implement?