-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Initial work towards adding type hints #656
Conversation
896119d
to
0ca2161
Compare
Codecov Report
@@ Coverage Diff @@
## master #656 +/- ##
==========================================
- Coverage 99.32% 99.31% -0.01%
==========================================
Files 94 94
Lines 11030 11011 -19
Branches 790 790
==========================================
- Hits 10955 10936 -19
Misses 56 56
Partials 19 19
Continue to review full report at Codecov.
|
0ca2161
to
32ee8f5
Compare
32ee8f5
to
62ea141
Compare
Yeah, socket is going to be a problem. It's probably fairly straightforward to clean up the functions, but for the constants, the set exported by python changes unpredictably between versions and build configurations, so I don't know that there is any way to avoid the dynamic re-export. Maybe we can just annotate the constants we use, or something... Anyway, this looks good. Do you think there should be a release note, or should we wait until it's further along? |
At some point downstream users are going to have to deal with that - I think the most sensible approach is for us to just ensure that all the names we use are visible to Mypy, and leave a very obvious comment on what's happening for anyone who resorts to reading the code.
I wouldn't announce anything to users until we ship the PEP 561 |
Staircase review: this should have fixed tab completion for (not that tab completion is very important for |
This PR contains some incremental work towards both #542 and #543. It's definitely not finished, but we found on Hypothesis (and on #594!) that merging this kind of thing in small pieces helps keep it moving 😄
There are basically four parts to this:
mypy.ini
, with some notes on what to enable next(Mypy has special-case code to understand them but it relies on proximity)
It does not run Mypy in CI, because there are still dozens of errors - many related to the highly-dynamic sockets module (not that the stdlib is more stable...).