Skip to content

Typing cleanups 2 - Make all the handlers inherit from IHandler protocol to remove casts, consolidate tests. - #829

Draft
ThosRTanner wants to merge 2 commits into
python-zk:masterfrom
ThosRTanner:typing_cleanups_2
Draft

ThosRTanner wants to merge 2 commits into
python-zk:masterfrom
ThosRTanner:typing_cleanups_2

Conversation

@ThosRTanner

Copy link
Copy Markdown
Contributor

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

  • Make all the SequentialHandlers inherit from the IHandler Protocol
  • Clean up the IAsyncResult protocol and uses of it.
  • ...

Does this PR introduce any breaking change?

No.

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.94118% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.44%. Comparing base (f54c4fd) to head (d719a7a).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
kazoo/handlers/gevent.py 13.51% 32 Missing ⚠️
kazoo/handlers/eventlet.py 0.00% 13 Missing ⚠️
kazoo/protocol/connection.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #829      +/-   ##
==========================================
- Coverage   94.90%   90.44%   -4.47%     
==========================================
  Files          27       27              
  Lines        3811     3799      -12     
==========================================
- Hits         3617     3436     -181     
- Misses        194      363     +169     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The unit tests for the 3 sequential handlers should be consolidated.

1 participant