Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2502 +/- ##
==========================================
+ Coverage 97.98% 98.84% +0.86%
==========================================
Files 118 118
Lines 16324 16327 +3
Branches 3156 3156
==========================================
+ Hits 15995 16139 +144
+ Misses 266 133 -133
+ Partials 63 55 -8
|
pquentin
left a comment
There was a problem hiding this comment.
Thanks! This looks good, but how did you test it? Is running mypy on this file working? If so we should do it in CI too.
@pquentin I tested it by running mypy on the file. It is working.
We already are, for python 3.8 at least: https://github.com/python-trio/trio/actions/runs/3683469595/jobs/6232645740 (Look at the bottom of the "Run tests" step) |
|
This makes sure that the annotations are valid, but not that they are complete. If tomorrow I add a new function to this file without annotations mypy won't complain about it. It's not blocking for this pull request but we should strive to have complete annotations for each file and enforce that in CI using mypy --strict. This approach was used successfully by urllib3. |
I'm aware that this technique has been used with success, and I'm a fan of introducing it. Doing so should be a separate PR. I might look into it soon. For now, though, annotation coverage is so low that regressing coverage is the least of my worries. |
Complete type annotations for the
_unix_pipesmodule.