-
-
Notifications
You must be signed in to change notification settings - Fork 86
TYP: Inline typing annotations #136
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for including this, @jorenham it looks like great progress. I'm going to be busy this week, however I'll try to review it next weekend in depth. |
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.
This looks great! I've played around with it and seems to follow my intuition about what the types should be doing.
As this is quite a large PR, I'm going to leave it open for another week or so to see if there's any community feedback. Otherwise I'll merge it next weekend.
Thanks for your work @jorenham
I intentionally annotated the input types to (also) accept the overly-loose
numpy.typing.ArrayLike
type. Because even though that also accepts invalid input, it would avoid breaking user code likewhich I'm guessing is the primary use-case of
numpy_financial
(or maybe that was just me).Anyway, there's still quite a bit of room for improvement. For example, by making
mypy
andpyright
pass is strict mode. But getting there wll take quite a bit of effort for diminishing returns.Closes #133