Skip to content

chore: add return type annotation to _is_payment_required in CryptoGetAccountBalanceQuery#2188

Merged
manishdait merged 2 commits into
hiero-ledger:mainfrom
ManmathX:fix/add-return-type-is-payment-required
Apr 22, 2026
Merged

chore: add return type annotation to _is_payment_required in CryptoGetAccountBalanceQuery#2188
manishdait merged 2 commits into
hiero-ledger:mainfrom
ManmathX:fix/add-return-type-is-payment-required

Conversation

@ManmathX

Copy link
Copy Markdown
Contributor

Description

Add the missing -> bool return type annotation to the _is_payment_required() method in CryptoGetAccountBalanceQuery.
This was the only public/private method in the class without a return type annotation. The return type is unambiguous — the method always returns False, and the existing docstring already documents it as bool.

Changes

  • File: src/hiero_sdk_python/query/account_balance_query.py
  • Change: def _is_payment_required(self):def _is_payment_required(self) -> bool:
    No other files, methods, or lines were modified. SDK behavior is unchanged.

Testing

  • All 13 unit tests in tests/unit/account_balance_query_test.py pass ✅

Related Issue

Closes #2059

Copilot AI review requested due to automatic review settings April 22, 2026 11:10
@ManmathX
ManmathX requested review from a team as code owners April 22, 2026 11:10
@codacy-production

codacy-production Bot commented Apr 22, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes. Give us feedback

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the missing -> bool return type annotation to _is_payment_required() in CryptoGetAccountBalanceQuery, aligning it with the rest of the query classes’ typed method signatures without changing runtime behavior.

Changes:

  • Add -> bool return type annotation to CryptoGetAccountBalanceQuery._is_payment_required().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai

coderabbitai Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c3e2506c-1224-4746-a13a-3b5c4f5d7153

📥 Commits

Reviewing files that changed from the base of the PR and between 376f07e and bc259f1.

📒 Files selected for processing (1)
  • src/hiero_sdk_python/query/account_balance_query.py

Walkthrough

The change adds an explicit return type annotation (-> bool) to the _is_payment_required method in the CryptoGetAccountBalanceQuery class. No logic or behavior is modified.

Changes

Cohort / File(s) Summary
Return Type Annotation
src/hiero_sdk_python/query/account_balance_query.py
Added return type annotation -> bool to the _is_payment_required method signature.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR successfully implements the core requirement from issue #2059 by adding the -> bool return type annotation to _is_payment_required() in CryptoGetAccountBalanceQuery. The PR is missing required elements: no .CHANGELOG.md entry was added under [UNRELEASED], and commits lack DCO/GPG signing as noted in manishdait's comment. These must be completed per issue #2059 requirements.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a return type annotation to the _is_payment_required method in CryptoGetAccountBalanceQuery.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the addition of the -> bool return type annotation and confirming no other changes were made.
Out of Scope Changes check ✅ Passed All changes are in scope—only the _is_payment_required method signature was modified in the single file src/hiero_sdk_python/query/account_balance_query.py as required.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #2059

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ManmathX
ManmathX force-pushed the fix/add-return-type-is-payment-required branch from 376f07e to 99c6908 Compare April 22, 2026 11:32
@manishdait

Copy link
Copy Markdown
Contributor

@ManmathX, Thanks for the PR, the commit is missing signoff. you can run git commit --amend --no-edit -s and then push.

…tAccountBalanceQuery

Signed-off-by: ManmathX <manmath2006n@gmail.com>
@ManmathX
ManmathX force-pushed the fix/add-return-type-is-payment-required branch from 99c6908 to bc259f1 Compare April 22, 2026 15:23
@ManmathX

Copy link
Copy Markdown
Contributor Author

Hi @manishdait , thanks for pointing that out. I’ve fixed the issue by adding the sign-off and updated the commit. Please let me know if anything else needs to be addressed.

@aceppaluni aceppaluni added reviewer: junior committer request review from junior committers with triage permissions reviewer: committer request review help from a committer labels Apr 22, 2026
@github-actions github-actions Bot added the Good First Issue Issues which are ideal for a first time or new project contributor. label Apr 22, 2026
@aceppaluni aceppaluni added the step: 1st 1st stage of the review approval process label Apr 22, 2026
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2188   +/-   ##
=======================================
  Coverage   93.68%   93.68%           
=======================================
  Files         145      145           
  Lines        9426     9426           
=======================================
  Hits         8831     8831           
  Misses        595      595           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@manishdait
manishdait merged commit cbddff0 into hiero-ledger:main Apr 22, 2026
26 checks passed
AntonioCeppellini pushed a commit to AntonioCeppellini/hiero-sdk-python that referenced this pull request Apr 22, 2026
…tAccountBalanceQuery (hiero-ledger#2188)

Signed-off-by: ManmathX <manmath2006n@gmail.com>
parvninama pushed a commit to parvninama/hiero-sdk-python that referenced this pull request Apr 25, 2026
…tAccountBalanceQuery (hiero-ledger#2188)

Signed-off-by: ManmathX <manmath2006n@gmail.com>
@manishdait manishdait added this to the v0.2.6 milestone Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First Issue Issues which are ideal for a first time or new project contributor. reviewer: committer request review help from a committer reviewer: junior committer request review from junior committers with triage permissions step: 1st 1st stage of the review approval process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Good First Issue]: Add missing return type annotation to _is_payment_required() in CryptoGetAccountBalanceQuery

4 participants