Repository navigation
Typing cleanups 2 - Make all the handlers inherit from IHandler protocol to remove casts, consolidate tests. - #829
ThosRTanner wants to merge 10 commits into
Conversation
a5276bb to
d719a7a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #829 +/- ##
==========================================
+ Coverage 94.90% 96.57% +1.66%
==========================================
Files 27 27
Lines 3811 3737 -74
==========================================
- Hits 3617 3609 -8
+ Misses 194 128 -66 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d0d5e83 to
03b8760
Compare
|
I like cleanup too, thanks for this. I would also prefer if you put the content in the commit message itself instead of referring to the PR. E.g. "chore(typing): clean up some of the workarounds from the initial PR Git commit log is our true history, not so much github PRs. |
|
There is also opportunity for squashing a couple of these commits, I think. |
Yeah, sorry, nowhere near finished on this. hence why it's draft |
See PR for details
6968621 to
a49cd39
Compare
Fixes #828 (oddly)
Depends on #801
Why is this needed?
This makes the type checking safer and allows us to remove a lot of casting.
Proposed Changes
Does this PR introduce any breaking change?
Potentially, yes. It is no longer possible to pass a string to
IHandler.timeout_exception- note that when this was used with gevent handlers, the string gets discarded, but it also meant that timeouts on thegetandget_nowaitmethods inIAsyncHandlercould throw an unexpected exception (gevent.Timeout, not theIHandler.timeout_exception, which returned a wrapper).