-
Notifications
You must be signed in to change notification settings - Fork 310
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 type annotations via MonkeyType #469
Conversation
This should be rebased/redone (and maybe closed and resubmitted) once #498 (Twine 2.0) is merged. |
6ac2244
to
d318923
Compare
After rebasing on |
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.
I think this is fine to merge as-is!
Thanks! |
Also, thanks @waseem18 for your initial work on this! |
Following @carljm's comments on #231 and #466, and watching his PyCon 2018 talk, I decided to back up a bit, and experiment with using MonkeyType to generate the annotations based on the test suite.
There was some non-trivial clean-up (e.g., overly-specific
Union
s, replacingpackage: stub
withpackage: PackageFile
, etc.), but overall I found it to be straightforward and educational re: type hinting in general and the Twine codebase.Also, mypy is passing at the moment, so I stopped ignoring the result in
testenv:lint
.As before, I'm curious what folks think.