pyopencl
pyopencl copied to clipboard
feat: create Python typing stub
Since python 3.6, we can add type information to python variables, functions, etc... Having such type information specified can avoid many mistakes early before they lead to runtime error. Since this library wants to maintain its support for python 2.7, adding type annotations to the code in the python modules is infeasible. As a result, stubs can be implemented to provide type information while maintaining backward-compatibility.
More information, https://www.python.org/dev/peps/pep-0484/
Thanks for the suggestion. I'm not opposed to having type annotations, but I'm unlikely to work on them myself. I'd be happy to take a PR, though.
Maybe someone interested and has some few time can work on this then :) Or, maybe when I am more free and more familiar this library (I'm still learning how to use efficiently).