lelit/pglast

Feature request: pep 484 type annotations

Closed this issue · 2 comments

SKalt commented

Would you be interested in my attempting to add type annotations?
I'm picturing writing type annotations compatible with python 3.6+ for the python code, some type-generation step for the cython code, and adding a mypy check for the test suite.

lelit commented

Never used yet, and thus I cannot say how much work that would require, nor figure out exactly the benefits, but yes, I've nothing against.

SKalt commented

Cool! After proposing this I realized how much work it would be to wring peep 484 type annotations out of Cython, so I'm going to close this issue as "too difficult for something that's a nice-to-have". Convenience is my main motivation for adding pep 484 type annotations: my usual workflow involves language servers supplying type information and mypy telling me when I incorrectly typed something.