Adding typing hints#773
Conversation
67b03cf to
4253758
Compare
4253758 to
0739cf6
Compare
0739cf6 to
48e9478
Compare
48e9478 to
b2e245d
Compare
339f1ec to
7edcb3b
Compare
5da635b to
d67849a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #773 +/- ##
==========================================
- Coverage 96.67% 95.58% -1.10%
==========================================
Files 27 27
Lines 3553 3895 +342
==========================================
+ Hits 3435 3723 +288
- Misses 118 172 +54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a9318af to
5168260
Compare
7063c61 to
f62a077
Compare
5035143 to
ec7dc06
Compare
|
Really appreciate the tons of work you put into this PR. Can't wait to see it ready! |
|
b724031 to
f027cf3
Compare
09c3b2e to
b40a0da
Compare
1d2790c to
91934ff
Compare
9d67e4b to
b8854de
Compare
This adds nearly full type hinting, and enables all but two of the mypy checks that were enabled in the mypy section in pyproject.toml. I hope to address the remaining checks, but it was proving tricky to address some of the 'typing.Any' uses. Also if you enable deprecation checks with --enable-error-code=deprecated You'll get warnings if you use deprecated options (at least as far as I was able to spot them!) This addresses python-zk#647 but there's not entirely strict checking as yet. Although I've tried very hard not to change any code for this, some `return None` statements have been added, which has caused the code coverage to drop as apparently those return paths were not covered by the testing. Also I've been less polite with the testing, and have changed the code in a number of places, including dropping test classes that did nothing, and adding asserts here and there to keep mypy happy as it sometimes doesn't spot a value could have been changed. I've added FIXMEs to address some of the more egregious type warning suppression that I did to avoid doing code changes, and intend to address those in another PR. A note: I've also had to suppress some errors in flake8 and use more general 'type: ignore' suppressions than I'd like because hound CI does something very very odd and tries to parse the text in the [] of the type: ignore[] comments as python, and generates some very peculiar messages.
d920398 to
ebb5665
Compare
|
closed in favour of 791 because this is now unreadable |
|
Fixes #
Why is this needed?
Proposed Changes
Does this PR introduce any breaking change?