Skip to content

chore(typing): clean up some of the workrounds from the initial PR - #801

Draft
ThosRTanner wants to merge 1 commit into
python-zk:masterfrom
ThosRTanner:typing_cleanups_1
Draft

chore(typing): clean up some of the workrounds from the initial PR#801
ThosRTanner wants to merge 1 commit into
python-zk:masterfrom
ThosRTanner:typing_cleanups_1

Conversation

@ThosRTanner

@ThosRTanner ThosRTanner commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Why is this needed?

This addresses some of the issues spotted when adding type checking but left until later due to the extent of the initial pull request.

Proposed Changes

  • Clean up the kazoo client init method to setup up the retry handlers and hosts lists more cleanly
  • Some tests removed in because what was being tested would not have passed mypy were it not for the way self.assertRaises handles the parameter list.
  • ...

Does this PR introduce any breaking change?

If anyone directly calls kazoo.hosts.collect_hosts it will no longer return None for the chroot. It will return "" in that situation. But that isn't part of the published API.

Comment thread kazoo/interfaces.py Outdated
@ThosRTanner
ThosRTanner force-pushed the typing_cleanups_1 branch 3 times, most recently from 9e173cb to 0090452 Compare September 5, 2026 17:38
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.87234% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.45%. Comparing base (e894342) to head (d4b8623).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
kazoo/client.py 97.14% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #801      +/-   ##
==========================================
- Coverage   96.65%   95.45%   -1.20%     
==========================================
  Files          27       27              
  Lines        3554     3832     +278     
==========================================
+ Hits         3435     3658     +223     
- Misses        119      174      +55     

☔ 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.

@ThosRTanner
ThosRTanner force-pushed the typing_cleanups_1 branch 2 times, most recently from 55a0f78 to fa8a966 Compare September 6, 2026 07:35
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.

2 participants