paco icon indicating copy to clipboard operation
paco copied to clipboard

Typing support

Open sobolevn opened this issue 4 years ago • 2 comments

Hi!

Thanks a lot for building this library. It looks awesome and I cannot imagine how people live without it.

The only missing feature for me are type annotations. That can be added rather easily. Currently we are working on async functions support for returns library: https://github.com/dry-python/returns/issues/274

It would be awesome if we can use these two together. But, one of the most important features of our library is full mypy-compatible typing.

I would love to help and add types if you don't mind!

sobolevn avatar Apr 22 '20 11:04 sobolevn

I think that's interesting and perfectly doable since PEP484 introduced optional syntactical support for type annotations.

The only downside is perhaps the Python 3.4 should be deprecated and package syntax should embrace async/await operators, but I don't any problem these days.

I'm open to explore and bring that feature into the package, as long as there is no opinionated style or dependencies by doing so.

h2non avatar Apr 22 '20 15:04 h2non

as long as there is no opinionated style or dependencies by doing so

There might be some @oveload and typevars here and there. If that's a problem, we can always move this code to .pyi file. And yes, python3.4 should be deprecated. It is not officially supported anymore.

sobolevn avatar Apr 22 '20 16:04 sobolevn