Skip to content

Conversation

@cheese-cakee
Copy link
Contributor

@cheese-cakee cheese-cakee commented Jan 7, 2026

Fixes #1391

- Add comprehensive docstring explaining inclusive vs exclusive fee assessment
- Clarify when each method should be used and their payment implications
- Update changelog entry

Fixes #1391

Signed-off-by: cheese-cakee <[email protected]>
- Add comprehensive docstring explaining fungible vs non-fungible tokens
- Provide use cases and examples for each token type
- Update changelog entry

Fixes #1392

Signed-off-by: cheese-cakee <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

Adds a comprehensive docstring to the FeeAssessmentMethod enum and introduces a new public enum member EXCLUSIVE = 1 alongside existing INCLUSIVE = 0; also normalizes the CHANGELOG header to ASCII.

Changes

Cohort / File(s) Summary
Changelog update
CHANGELOG.md
Normalized header to ASCII # Changelog (non-functional text change).
Documentation & Enum change
src/hiero_sdk_python/tokens/fee_assessment_method.py
Expanded FeeAssessmentMethod docstring with descriptions and example usage; added new public enum member EXCLUSIVE = 1 (public API change).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title mentions enhancing the FeeAssessmentMethod enum docstring, but the summary indicates a new enum member EXCLUSIVE was added, which extends beyond just documentation. Clarify whether the title should reflect both the docstring enhancement and the new EXCLUSIVE enum member addition, or if EXCLUSIVE was added separately.
Out of Scope Changes check ❓ Inconclusive The summary indicates a new public enum member EXCLUSIVE=1 was added, but the issue #1391 only requests docstring enhancement and does not mention adding new enum values. Verify whether adding the EXCLUSIVE enum member is a required part of the issue scope or if it represents an out-of-scope change that should be addressed separately.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses issue #1391 by adding a comprehensive Google-style docstring to FeeAssessmentMethod enum with attributes, examples, and documentation matching the repository's style.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description 'Fixes #1391' directly relates to the changeset, which enhances the FeeAssessmentMethod enum docstring as required by issue #1391.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89afede and 3c6d67a.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/hiero_sdk_python/tokens/fee_assessment_method.py
🧰 Additional context used
🪛 Ruff (0.14.10)
src/hiero_sdk_python/tokens/fee_assessment_method.py

7-7: Docstring contains ambiguous (EN DASH). Did you mean - (HYPHEN-MINUS)?

(RUF002)


10-10: Docstring contains ambiguous (EN DASH). Did you mean - (HYPHEN-MINUS)?

(RUF002)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
src/hiero_sdk_python/tokens/fee_assessment_method.py (1)

18-19: The EXCLUSIVE enum member is properly integrated and tested.

Verification confirms that FeeAssessmentMethod.EXCLUSIVE is already used in unit tests (tests/unit/custom_fee_test.py, lines 117 and 130) with proper assertions verifying the enum value. The feature is documented in the docstring (lines 10-12), supports round-trip proto serialization/deserialization (line 171 of custom_fractional_fee.py), and integrates with the existing CustomFractionalFee class. No assumptions that FeeAssessmentMethod contains only INCLUSIVE were found.

CHANGELOG.md Outdated
## [Unreleased]

### Added
- Added comprehensive docstring to `FeeAssessmentMethod` enum explaining inclusive vs exclusive fee assessment methods. (#1391)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Changelog entry is incomplete—missing the EXCLUSIVE enum member addition.

The changelog entry only mentions the docstring addition, but the code changes also introduce a new EXCLUSIVE = 1 enum member. This is a functional change to the public API that should be documented in the changelog.

📝 Suggested changelog update
-- Added comprehensive docstring to `FeeAssessmentMethod` enum explaining inclusive vs exclusive fee assessment methods. (#1391)
+- Added comprehensive docstring to `FeeAssessmentMethod` enum explaining inclusive vs exclusive fee assessment methods. Added `EXCLUSIVE = 1` enum member to support fee charging in addition to the transferred amount. (#1391)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Added comprehensive docstring to `FeeAssessmentMethod` enum explaining inclusive vs exclusive fee assessment methods. (#1391)
- Added comprehensive docstring to `FeeAssessmentMethod` enum explaining inclusive vs exclusive fee assessment methods. Added `EXCLUSIVE = 1` enum member to support fee charging in addition to the transferred amount. (#1391)

Fix RUF002 linting error by replacing – with - in docstring
to comply with code style guidelines.

Signed-off-by: cheese-cakee <[email protected]>
Fix RUF002 linting error by replacing – with - in docstring
to comply with code style guidelines.

Signed-off-by: cheese-cakee <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c6d67a and 2667e60.

📒 Files selected for processing (1)
  • src/hiero_sdk_python/tokens/fee_assessment_method.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis

@exploreriii exploreriii requested a review from a team January 8, 2026 00:53
CHANGELOG.md Outdated
## [Unreleased]

### Added
- Added comprehensive docstring to `FeeAssessmentMethod` enum explaining inclusive vs exclusive fee assessment methods. (#1391)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update the CHANGELOG.md to mention the new enum member, not just the documentation change.

Copy link
Contributor

@exploreriii exploreriii left a comment

Choose a reason for hiding this comment

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

Hi @cheese-cakee
I think this is a really nice idea, your docstring is informative and not too long.

To push this dosctring to the next level, let's please use google-style docstrings
https://realpython.com/how-to-write-docstrings-in-python/

something very similar would be like this:

class FeeAssessmentMethod(Enum):
    """Fee assessment method for custom token fees.

    Determines whether custom fees are deducted from the transferred amount
    or charged separately.

    Attributes:
        INCLUSIVE: Fee is 
    """

    INCLUSIVE = 0
    EXCLUSIVE = 1

Represents the fee assessment method for custom fees.
Fee assessment method for custom token fees:
• INCLUSIVE - Fee is deducted from the transferred amount.
Copy link
Contributor

Choose a reason for hiding this comment

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

The indendation for inclusive and exclusive need to match please

Represents the fee assessment method for custom fees.
Fee assessment method for custom token fees:
• INCLUSIVE - Fee is deducted from the transferred amount.
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be inside an attributes section
Attributes:

The recipient receives the full transferred amount, and the payer
pays the fee on top of that.
This determines whether custom fees are taken from the transaction amount
Copy link
Contributor

Choose a reason for hiding this comment

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

The definitions should be above the attributes

@exploreriii exploreriii marked this pull request as draft January 8, 2026 09:10
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Hi, this is MergeConflictBot.
Your pull request cannot be merged because it contains merge conflicts.

Please resolve these conflicts locally and push the changes.

To assist you, please read:

Thank you for contributing!

…ples

- Add comprehensive Google-style docstring with Attributes, Examples, Args, Returns sections
- Include practical example usage for better developer understanding
- Maintain existing functionality while improving documentation quality

Addresses maintainer feedback for better docstring format

Signed-off-by: cheese-cakee <[email protected]>
- Add comprehensive Google-style docstring with Attributes, Examples, Args, Returns sections
- Include practical example usage for better developer understanding
- Maintain existing functionality while improving documentation quality

Addresses maintainer feedback for better docstring format

Signed-off-by: cheese-cakee <[email protected]>
- Both PRs are up to date with latest changes
- No actual merge conflicts detected
- Documentation improvements implemented as requested by maintainer
@cheese-cakee cheese-cakee marked this pull request as ready for review January 8, 2026 12:22
…ocstring improvements

- Add changelog entries for PR #1393 and #1394
- Document enhanced docstrings with Google-style format and examples
- Reflects proper contributor acknowledgments

Prepares changelog for proper documentation of recent enhancements

Signed-off-by: cheese-cakee <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2667e60 and 9ef922c.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/hiero_sdk_python/tokens/fee_assessment_method.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
src/hiero_sdk_python/tokens/fee_assessment_method.py (1)

29-30: Inconsistency detected between AI summary and actual changes.

The AI-generated summary claims this PR "introduces a new public enum member EXCLUSIVE = 1", but lines 29-30 show no change markers (~). Only the docstring (lines 4-26) was modified. Both enum members appear to have existed prior to this PR.

CHANGELOG.md (1)

1-1: LGTM!

Normalizing the CHANGELOG header to standard ASCII markdown format improves consistency.

Comment on lines 22 to 26
Args:
value (int): The numeric value representing the fee assessment method.
Returns:
FeeAssessmentMethod: The enum instance for the specified method.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove Args and Returns sections from Enum docstring.

The Args and Returns sections are inappropriate for an Enum class docstring. Python Enums are accessed as FeeAssessmentMethod.INCLUSIVE or constructed via FeeAssessmentMethod(0), not called with explicit arguments as the docstring suggests. These sections will confuse users about how to use the enum.

📝 Suggested fix

Remove the Args and Returns sections entirely:

     Example:
         >>> # Using inclusive fee assessment
         >>> assessment = FeeAssessmentMethod.INCLUSIVE
         >>> print(f"Fee type: {assessment}")
         Fee type: FeeAssessmentMethod.INCLUSIVE
-
-    Args:
-        value (int): The numeric value representing the fee assessment method.
-
-    Returns:
-        FeeAssessmentMethod: The enum instance for the specified method.
 
     """
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Args:
value (int): The numeric value representing the fee assessment method.
Returns:
FeeAssessmentMethod: The enum instance for the specified method.
Example:
>>> # Using inclusive fee assessment
>>> assessment = FeeAssessmentMethod.INCLUSIVE
>>> print(f"Fee type: {assessment}")
Fee type: FeeAssessmentMethod.INCLUSIVE
"""

Copy link
Contributor

Choose a reason for hiding this comment

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

yes we can delete them, args and returns are helpful for functions only

- Force GitHub to update PR status with latest changes
@github-actions

This comment was marked as resolved.

- Add comprehensive docstring explaining fungible vs non-fungible tokens
- Provide use cases and examples for each token type
- Update changelog entry

Fixes #1392

Signed-off-by: cheese-cakee <[email protected]>
Fix RUF002 linting error by replacing – with - in docstring
to comply with code style guidelines.

Signed-off-by: cheese-cakee <[email protected]>
- Add comprehensive Google-style docstring with Attributes, Examples, Args, Returns sections
- Include practical example usage for better developer understanding
- Maintain existing functionality while improving documentation quality

Addresses maintainer feedback for better docstring format

Signed-off-by: cheese-cakee <[email protected]>
- Both PRs are up to date with latest changes
- No actual merge conflicts detected
- Documentation improvements implemented as requested by maintainer
@exploreriii exploreriii marked this pull request as draft January 8, 2026 12:31
- Removed Args/Returns sections from enum classes as they don't accept parameters
- Fixed indentation to follow Google-style docstring format
- Maintained comprehensive Examples and Attributes sections
Copy link
Contributor

@exploreriii exploreriii left a comment

Choose a reason for hiding this comment

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

@exploreriii
Copy link
Contributor

Hi @cheese-cakee please try again on an updated fork and new branch

@exploreriii exploreriii closed this Jan 8, 2026
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.

[Good First Issue]: Add docstring to FeeAssessmentMethod enum in src/hiero_sdk_python/tokens/fee_assessment_method.py

3 participants