-
-
Notifications
You must be signed in to change notification settings - Fork 44
Add return type hints #697
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
Conversation
Normally I'd say don't bother, but for an API like this I like the explicitness. |
I think this should be good mostly. please have a look as some of the edge cases feel hacky as usual. Will look into adding typing for properties/attributes (I think also the args to some of the constructors like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There are merge conflicts ! |
ah, got to rebase and likely rerun codegen. But will probably only get to that later today |
closes #696
found where the type hints can be added in codegen, had to work through a bunch of edge cases. Will see if these cases can be added to already existing utils.
also not sure if
-> None
is really wanted everywhere.still in progress... hopefully I can get this done early next week.
as for the 2nd question in the issue, I looked through some ideas with stub classes in mypy, .pyi files and even using
if "TYPE_CHECKING"
to import the autobackend. But doesn't feel like that solves the issue if having the "go to declaration" button go to the implementation - I might keep this an option issue.