Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MyPy type annotations #36

Closed
graingert opened this issue Jan 3, 2019 · 5 comments · Fixed by #84
Closed

MyPy type annotations #36

graingert opened this issue Jan 3, 2019 · 5 comments · Fixed by #84

Comments

@graingert
Copy link

This library is very functional and has an emphasis on composition - type annotations with generics would make using it much more robust

@vxgmichel
Copy link
Owner

Hi @graingert, and thanks for creating this issue!

I fully agree with your point. I don't have time to dive into mypy and type annotations at the moment, but it definitely is on the todo list :)

@Lx
Copy link

Lx commented May 20, 2023

Hi @vxgmichel! I know it doesn't contribute much value, but I hope you might accept my +1 for this feature request.

I permanently use strict type checking because it allows me to catch errors before I even run the code. It also serves as a very, very effective form of documentation because I often know what I want, and I can work out what to provide based on the type hints.

While I'm quite familiar with RxJS, I find myself moving very slowly with aiostream—and a big part of this is the missing type hints.

I've tried to progress by adding type annotations to the existing aiostream codebase locally, but some of the parts (like @operator) are too difficult for me to understand what is happening.

@vxgmichel
Copy link
Owner

Hi @Lx, I finally took the time to type the code base: #84

All of the aiostream package is strictly checked, except for aiostream.test_utils. There are also a couple of type: ignore here and there.

Could you give it a try and let me know if it helps with you usage? Thanks :)

@javajawa
Copy link

Hi!
I am also interested in type annotations for this project (and actually got a couple of hours into adding them without noticing this branch).

It looks like you've got it solved, but if you need an extra pair of hands I'm happy to help.

@vxgmichel
Copy link
Owner

Hi @javajawa

if you need an extra pair of hands I'm happy to help.

Oh that's so nice thank you ! Would you mind trying #84 and see if it works correctly with your own project? I had to go heavy-handed with the annotations so it's very likely I missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants