-
Notifications
You must be signed in to change notification settings - Fork 17
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
Infer magic methods #1
Comments
Thanks, that's great to hear! I'm going to do some more work on in this in the next couple of weeks. I agree with Other methods we could infer:
|
This is an interesting topic to discuss, BTW. I think autotyper can partially infer some types because it is better than nothing. In this case, |
That's a fair point. It will also introduce new mypy errors if you have |
Just merged support for most of this, except for Let me know if you have more ideas for improvements! |
Great! Thank you. I'll give it a try :) Beautiful project, BTW, I always wanted something like this. I've added it into awesome-python-typing. |
Thank you for the project. I tried it on the project, and it works. At least, doesn't break anything :)
The return type for some magic methods can be also auto-annotated. A few examples:
__str__
and__repr__
returnstr
__init__
returnsNone
iter
returnstyping.Iterable
The text was updated successfully, but these errors were encountered: