Add complete type hints to SubscriptionHandle - #2564
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. Walkthrough
ChangesSubscriptionHandle typing
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized change adds type hints without modifying runtime behavior, so no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add `-> None` return annotations to `__init__`, `_set_call`, `cancel`, and `set_thread`. Update `join` signature to use `timeout: float | None = None) -> None`. This is a types-only change — no method bodies or behavior modified. Follows the typing conventions in docs/sdk_developers/types.md (PEP 604 union syntax, inline type hints). Closes hiero-ledger#2560 Signed-off-by: Samir <as7111771-create@users.noreply.github.com>
|
@as7111771-create, thanks for the PR! It looks like the GPG signature on this commit couldn’t be verified. Could you please check and re-sign the commit? Thanks! |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #2564 +/- ##
=======================================
Coverage 95.44% 95.44%
=======================================
Files 165 165
Lines 10557 10557
=======================================
Hits 10076 10076
Misses 481 481 🚀 New features to boost your workflow:
|
aceppaluni
left a comment
There was a problem hiding this comment.
Happy to review when changes are addressed.
Please let us know if you need assistance :)
| Requesting triage review from: @hiero-ledger/hiero-sdk-python-triage |
|
Hi there! I'm the LinkedIssueBot.
Thank you, |
Description
This PR adds complete type hints to the
SubscriptionHandleclass insrc/hiero_sdk_python/utils/subscription_handle.py, as requested in #2560.(This is a re-open of #2562 — the previous PR was accidentally closed when the branch was recreated with DCO sign-off and GPG signing as requested by @danielmarv.)
Changes
This is a types-only change — no method bodies or behavior are modified.
-> Nonereturn annotation to__init__-> Nonereturn annotation to_set_call(kept existingcall: Anyparam annotation)-> Nonereturn annotation tocancel-> Nonereturn annotation toset_thread(kept existingthread: threading.Threadparam annotation)join(self, timeout=None)→join(self, timeout: float | None = None) -> Nonefloat | Nonesince the value passes directly tothreading.Thread.join(timeout), which takes seconds as a float orNoneArgs:docstring block fortimeoutis_cancelledwas already fully annotated — left unchangedConventions
Follows the typing conventions in
docs/sdk_developers/types.md:float | None) overOptional[float]from __future__ import annotationsat the top, so this union syntax works on Python 3.10DCO & GPG Sign-off
Commit includes:
Signed-off-by: Samir <as7111771-create@users.noreply.github.com>(DCO)Closes #2560