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

How to add type stubs for pipetools? #11

Open
nicksspirit opened this issue Jan 31, 2020 · 3 comments
Open

How to add type stubs for pipetools? #11

nicksspirit opened this issue Jan 31, 2020 · 3 comments

Comments

@nicksspirit
Copy link

No description provided.

@0101
Copy link
Owner

0101 commented Jan 31, 2020

Not sure about stubs, but I was looking into adding type annotations in pipetools a while back. At that time mypy wasn't able to figure out the type of a pipe even when everything was properly annotated. I'll try to have a look if anything's changed since then.

@nicksspirit
Copy link
Author

Thanks for getting back to me on this are you on slack or something?

@0101
Copy link
Owner

0101 commented Feb 2, 2020

Not really, just put any thoughts you have here :)

I looked at my type annotating attempt and it seems to more or less work. At least for the case where the first function has only one argument (don't think it can be done for any number of arguments, maybe hard-code for 1,2,3,4, probably not super important).

Pushed it in a branch: https://github.com/0101/pipetools/compare/type-annotations so you can have a look or even try to use it. If you do, let me know how it goes!

There are still some things that need annotating and also some test coverage and running mypy in Travis would be nice.

Of course any help would be appreciated.

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

No branches or pull requests

2 participants