3 ms·
Any plans to support Python type annotations, instead of using the @inputs and @outputs decorators?
by roberto 7y ago
Any plans to support Python type annotations, instead of using the @inputs and @outputs decorators?
- matthewphsmith 7y agoThat is something to which the SDK was designed to be extended--in fact, the SDK was designed specifically to be extended to different programming models besides the rudimentary one we provide out-of-box. However, we have not had the time to take on the implementation ourselves as the existing one serves our purposes at Lyft well and we are but a small team. So we do hope that someone in the community with a knack for syntax can help improve things!
- crorella 7y agoYou mean DataClasses?
- roberto 7y agoNo, I mean type annotations in the functions defining the tasks. If you look at their first example, they define a function called `get_traintest_splitdatabase`, and the input and outputs are annotated using two decorators.
- kumare3 7y agoRoberto, this is absolutely one of our goals. When we started, it was with python2.7 still around. We would love contributions, ofcourse we will work with you and adapt it
- tedmiston 7y agotyping — Support for type hints [1]. They are used by tools like mypy, not at runtime (by CPython at least), but still very useful. [1]: https://docs.python.org/3/library/typing.html https://docs.python.org/3/library/typing.html