Uh oh!
There was an error while loading. Please reload this page.
Ask PRs to annotate tests - #5694
Conversation
Unit Test Results 6 files 6 suites 56m 28s ⏱️ Results for commit e353086. |
| - [ ] Closes #xxxx | ||
| - [ ] Tests added | ||
| - [ ] Tests added, and functions annotated with `-> None:` |
There was a problem hiding this comment.
Let's discuss this more back in #5690, but I don't think I would understand what this means from the description here alone.
mathause
commented
Aug 12, 2021
An alternative would be to use check_untyped_defs. However, this would be much more strict. (I tried that once but ran into mypy errors I could not fix, so I gave up.) |
max-sixty
commented
Aug 12, 2021
Ah nice! That would be better. I guess we want it for new code — it would be the herculean effort to fix the old code, most of which doesn't imply a true problem. FWIW I think most of the false positives are when reassinging variables to different types; e.g. Is there a way of explaining the TODO in a way that's easy for new contributors to understand? That's probably the closest solution here |
max-sixty
commented
Nov 24, 2021
As discussed on the call — can we get mypy coverage? |
dcherian
commented
Nov 24, 2021
Here are the docs: https://mypy.readthedocs.io/en/stable/command_line.html#report-generation |
max-sixty
commented
Nov 24, 2021
Nice, thanks @dcherian . Is anyone familiar with coveralls / whether this can be added? Is it possible to have a rule like "new functions need to be typed", by looking at the diff? That requires storing the previous results. One other alternative is to do the work to get all the test files typed, and then enforce @mathause 's idea of |
pre-commit run --all-fileswhats-new.rstAs discussed #5690 (comment)