-
Notifications
You must be signed in to change notification settings - Fork 36
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
add typehints with mypy #58
base: master
Are you sure you want to change the base?
Conversation
Noticed now that I forgot to add the type checking to CI, will see if I can figure that out... |
Thanks. I'm very interested in mypy, but didn't have time to learn it. I will spend some time understanding this PR. |
Are you using the comments because we are still supporting Python 2.7? I think it's time to remove it so that we can use the type annotation. |
Nice! Yes, the type comments are there to support python < 3.5, which (I think) is the first version with support for proper annotations. Which python versions we should support is your call I feel. If your certain about dropping 2.7 (and probably also anything else before 3.5) I could update the PR to move away from the type comment style. |
Yes, please drop Python 2.7. |
…in tests A bit concerned that the callables and generics are becoming too unwieldy though.
Hello!
We're using flatten-dict in a typed context at work, so I created some stubs for it the other day. Felt like it could be nice to share them with you, but I think it's much easier to maintain typehints if they're written inline with the code, so I spent some time this weekend writing that up.
Had to upgrade black to avoid some broken import, and did my best to configure static type checking with mypy.
Don't know if you're interested at all, so feel free to ignore, but here you have it :)