Open ikamensh opened 2 years ago
Thank for the suggestion Ilya. Please feel free to send a PR for this.
My gut feeling is that it could be tricky to come up with useful types for a lot of the APIs, because they are highly polymorphic, but some type information is still definitely better than none at all.
Hello,
I'd like to propose a feature - to add type hints to public functions.
The most basic version of this would be to type hint return types in terms of
TypeVar
of input types, like:This could be taken further by making structure generic over it's item types, allowing to type hint functions like
flatten
:Overall, this should help users avoid preventable bugs and have more readable code. Thanks for considering :)