Include missing typehints (mostly function return value typehints) #99
+22
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey! Thank you very much for creating this library. I'd like to start using this library productively, but unfortunately, for quite a lot of functions, a return value type hint seems to be missing, especially when it's
None
.Note that although
pyright
will assumeNone
as the return type hint when the function is missing one,mypy
will assume (more rightly, if I may add)Any
, but also throw you an error if you're usingmypy
in "strict" mode (which one should, IMHO).For example, this code
will lead to
mypy
errors such as:In this PR, I added function return value typehints to all functions I could find where this is missing.