chore(typing): clean up some of the workrounds from the initial PR - #801
Open
ThosRTanner wants to merge 1 commit into
Open
chore(typing): clean up some of the workrounds from the initial PR#801ThosRTanner wants to merge 1 commit into
ThosRTanner wants to merge 1 commit into
Conversation
houndci-bot
reviewed
Sep 5, 2026
ThosRTanner
force-pushed
the
typing_cleanups_1
branch
3 times, most recently
from
September 5, 2026 17:38
9e173cb to
0090452
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #801 +/- ##
==========================================
- Coverage 96.65% 95.56% -1.10%
==========================================
Files 27 27
Lines 3554 3830 +276
==========================================
+ Hits 3435 3660 +225
- Misses 119 170 +51 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ThosRTanner
force-pushed
the
typing_cleanups_1
branch
4 times, most recently
from
September 6, 2026 21:42
d4b8623 to
01cdb41
Compare
ThosRTanner
marked this pull request as ready for review
September 10, 2026 19:44
ThosRTanner
marked this pull request as draft
September 10, 2026 19:55
ThosRTanner
force-pushed
the
typing_cleanups_1
branch
5 times, most recently
from
September 12, 2026 21:33
b3f5ddc to
7dba69c
Compare
ThosRTanner
marked this pull request as ready for review
September 12, 2026 21:34
ThosRTanner
force-pushed
the
typing_cleanups_1
branch
from
September 12, 2026 21:48
7dba69c to
d23c102
Compare
ThosRTanner
force-pushed
the
typing_cleanups_1
branch
from
September 12, 2026 21:49
d23c102 to
09821ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Going to do more pull requests based from this later, but this one is probably big enough as it is.
Proposed Changes
client__init__method to setup up the retry handlers and hosts lists more cleanlyset_hostsand__init__to simplify both to eventually make it possible to specify the chroot separately to the__init__method and not have to keep passing it if you change the host list.hosts/collect_hoststo always return an empty string if nochrootis specified.self.assertRaiseshandles the parameter list.fileobj_to_fdinhandlers/utilsas the checks aren't necessary which simplifies the place it is usedCreate2inserialization.pyso we don't have to quote the name for theTransactiontypes. Although it means they're not in numerical order, there were odd gaps in the numbering, so it was of questionable help.recipe/cache.pyrecipe/counter.pyto avoid type casting_Watchclass inrecipe/lock.pyto immediately start counting, and avoid some messy type castingtest_cache.pyto use a context handler for theTreeCache, making it generally easier to understandtest_selectors_select.pyas stdout admits it has afilenomethod, unlike the result ofos.popentest_retrywithfunctools.partialimportlib.utilsto determine if an import is available rather than usingimport x # noqalogger.warncalls withlogger.warningDoes this PR introduce any breaking change?
If anyone directly calls
kazoo.hosts.collect_hostsit will no longer returnNonefor the chroot. It will return""in that situation. But that isn't part of the published API.Codecov report
Codecov is still a few releases behind HEAD, so it's still reporting on the nominal missing coverage reported there (which makes it quite difficult to trust...)