-
Notifications
You must be signed in to change notification settings - Fork 124
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 #279
Add type annotations #279
Conversation
@@ -30,3 +30,5 @@ | |||
text_type = unicode | |||
except NameError: | |||
text_type = str | |||
|
|||
__all__ = ["urljoin", "pickle", "HTTPResponse", "is_fp_closed", "text_type"] |
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.
since setup.py requires python3 https://github.com/ionrock/cachecontrol/blob/6155c199438bfc3944a833f1dec6fb74134476f1/setup.py#L27
I suppose some or more of this file could be removed
These are great! We had a very minimal set of type hints for cachecontrol; and I updated our type hints to match yours in common-workflow-language/schema_salad@be8da2e ; and our type checking still pass. One note would be to add a |
I would love to see this merged and in the next release :-) This PR also adds |
I probably should have checked first whether this is something you even want, but if the answer is "no thanks" then fair enough: it wasn't so much work that either of us need feel bad about that.
I've added type annotations everywhere, and mypy configuration to check them. I haven't tried to update your github workflows, but all you should need to do is run like this: